author | Pierre-Yves David <pierre-yves.david@octobus.net> |
Thu, 01 Dec 2022 01:57:14 +0100 | |
changeset 49820 | 0df2cff04291 |
parent 38473 | 9ef9884e5d50 |
permissions | -rw-r--r-- |
36707 | 1 |
#testcases bdiff xdiff |
2 |
||
3 |
#if xdiff |
|
4 |
#require xdiff |
|
5 |
$ cat >> $HGRCPATH <<EOF |
|
6 |
> [experimental] |
|
7 |
> xdiff = true |
|
8 |
> EOF |
|
9 |
#endif |
|
10 |
||
11 |
Test case that makes use of the weakness of patience diff algorithm |
|
12 |
||
13 |
$ hg init |
|
38473
9ef9884e5d50
py3: make tests/test-diff-antipatience.t work with python 3
Pulkit Goyal <7895pulkit@gmail.com>
parents:
36707
diff
changeset
|
14 |
>>> open('a', 'wb').write(('\n'.join(list('a' + 'x' * 10 + 'u' + 'x' * 30 + 'a\n'))).encode('ascii')) and None |
36707 | 15 |
$ hg commit -m 1 -A a |
38473
9ef9884e5d50
py3: make tests/test-diff-antipatience.t work with python 3
Pulkit Goyal <7895pulkit@gmail.com>
parents:
36707
diff
changeset
|
16 |
>>> open('a', 'wb').write(('\n'.join(list('b' + 'x' * 30 + 'u' + 'x' * 10 + 'b\n'))).encode('ascii')) and None |
36707 | 17 |
#if xdiff |
18 |
$ hg diff |
|
19 |
diff -r f0aeecb49805 a |
|
20 |
--- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
21 |
+++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
22 |
@@ -1,4 +1,4 @@ |
|
23 |
-a |
|
24 |
+b |
|
25 |
x |
|
26 |
x |
|
27 |
x |
|
28 |
@@ -9,7 +9,6 @@ |
|
29 |
x |
|
30 |
x |
|
31 |
x |
|
32 |
-u |
|
33 |
x |
|
34 |
x |
|
35 |
x |
|
36 |
@@ -30,6 +29,7 @@ |
|
37 |
x |
|
38 |
x |
|
39 |
x |
|
40 |
+u |
|
41 |
x |
|
42 |
x |
|
43 |
x |
|
44 |
@@ -40,5 +40,5 @@ |
|
45 |
x |
|
46 |
x |
|
47 |
x |
|
48 |
-a |
|
49 |
+b |
|
50 |
||
51 |
#else |
|
52 |
$ hg diff |
|
53 |
diff -r f0aeecb49805 a |
|
54 |
--- a/a Thu Jan 01 00:00:00 1970 +0000 |
|
55 |
+++ b/a Thu Jan 01 00:00:00 1970 +0000 |
|
56 |
@@ -1,15 +1,4 @@ |
|
57 |
-a |
|
58 |
-x |
|
59 |
-x |
|
60 |
-x |
|
61 |
-x |
|
62 |
-x |
|
63 |
-x |
|
64 |
-x |
|
65 |
-x |
|
66 |
-x |
|
67 |
-x |
|
68 |
-u |
|
69 |
+b |
|
70 |
x |
|
71 |
x |
|
72 |
x |
|
73 |
@@ -40,5 +29,16 @@ |
|
74 |
x |
|
75 |
x |
|
76 |
x |
|
77 |
-a |
|
78 |
+u |
|
79 |
+x |
|
80 |
+x |
|
81 |
+x |
|
82 |
+x |
|
83 |
+x |
|
84 |
+x |
|
85 |
+x |
|
86 |
+x |
|
87 |
+x |
|
88 |
+x |
|
89 |
+b |
|
90 |
||
91 |
#endif |