##// END OF EJS Templates
test-extdiff: deduplicate tests
Matt Harbison -
r32209:c05f71e5 default
parent child Browse files
Show More
@@ -62,15 +62,10 b' Should diff cloned directories:'
62 62
63 63 Should diff cloned files directly:
64 64
65 #if windows
66 65 $ hg falabala -r 0:1
67 diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob)
66 diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !)
67 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !)
68 68 [1]
69 #else
70 $ hg falabala -r 0:1
71 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
72 [1]
73 #endif
74 69
75 70 Specifying an empty revision should abort.
76 71
@@ -92,41 +87,27 b' Test diff during merge:'
92 87
93 88 Should diff cloned file against wc file:
94 89
95 #if windows
96 90 $ hg falabala
97 diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "*\\a\\a" (glob)
91 diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "*\\a\\a" (glob) (windows !)
92 diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob) (no-windows !)
98 93 [1]
99 #else
100 $ hg falabala
101 diffing */extdiff.*/a.2a13a4d2da36/a */a/a (glob)
102 [1]
103 #endif
104 94
105 95
106 96 Test --change option:
107 97
108 98 $ hg ci -d '2 0' -mtest3
109 #if windows
99
110 100 $ hg falabala -c 1
111 diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob)
101 diffing "*\\extdiff.*\\a.8a5febb7f867\\a" "a.34eed99112ab\\a" (glob) (windows !)
102 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob) (no-windows !)
112 103 [1]
113 #else
114 $ hg falabala -c 1
115 diffing */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
116 [1]
117 #endif
118 104
119 105 Check diff are made from the first parent:
120 106
121 #if windows
122 107 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
123 diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "a.46c0e4daeb72\\a" (glob)
108 diffing "*\\extdiff.*\\a.2a13a4d2da36\\a" "a.46c0e4daeb72\\a" (glob) (windows !)
109 diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob) (no-windows !)
124 110 diff-like tools yield a non-zero exit code
125 #else
126 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
127 diffing */extdiff.*/a.2a13a4d2da36/a a.46c0e4daeb72/a (glob)
128 diff-like tools yield a non-zero exit code
129 #endif
130 111
131 112 issue3153: ensure using extdiff with removed subrepos doesn't crash:
132 113
@@ -158,21 +139,16 b' issue4463: usage of command line configu'
158 139 > EOF
159 140 $ hg update -q -C 0
160 141 $ echo a >> a
161 #if windows
142
162 143 $ hg --debug 4463a | grep '^running'
163 running 'echo a-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
144 running 'echo a-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
145 running 'echo a-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !)
164 146 $ hg --debug 4463b | grep '^running'
165 running 'echo b-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
147 running 'echo b-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
148 running 'echo b-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !)
166 149 $ hg --debug echo | grep '^running'
167 running '*echo* "*\\a" "*\\a"' in */extdiff.* (glob)
168 #else
169 $ hg --debug 4463a | grep '^running'
170 running 'echo a-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
171 $ hg --debug 4463b | grep '^running'
172 running 'echo b-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
173 $ hg --debug echo | grep '^running'
174 running '*echo */a $TESTTMP/a/a' in */extdiff.* (glob)
175 #endif
150 running '*echo* "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
151 running '*echo */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !)
176 152
177 153 (getting options from other than extdiff section)
178 154
@@ -189,29 +165,22 b' issue4463: usage of command line configu'
189 165 > [merge-tools]
190 166 > 4463b3.diffargs = b3-naked 'single quoted' "double quoted"
191 167 > EOF
192 #if windows
168
193 169 $ hg --debug 4463b2 | grep '^running'
194 running 'echo b2-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
170 running 'echo b2-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
171 running 'echo b2-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !)
195 172 $ hg --debug 4463b3 | grep '^running'
196 running 'echo b3-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
173 running 'echo b3-naked \'single quoted\' "double quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
174 running 'echo b3-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !)
197 175 $ hg --debug 4463b4 | grep '^running'
198 running 'echo "*\\a" "*\\a"' in */extdiff.* (glob)
176 running 'echo "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
177 running 'echo */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !)
199 178 $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running'
200 running 'echo b4-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
179 running 'echo b4-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
180 running "echo b4-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob) (no-windows !)
201 181 $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running'
202 running 'echo echo-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob)
203 #else
204 $ hg --debug 4463b2 | grep '^running'
205 running 'echo b2-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
206 $ hg --debug 4463b3 | grep '^running'
207 running 'echo b3-naked \'single quoted\' "double quoted" */a $TESTTMP/a/a' in */extdiff.* (glob)
208 $ hg --debug 4463b4 | grep '^running'
209 running 'echo */a $TESTTMP/a/a' in */extdiff.* (glob)
210 $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running'
211 running "echo b4-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob)
212 $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running'
213 running "echo echo-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob)
214 #endif
182 running 'echo echo-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
183 running "echo echo-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob) (no-windows !)
215 184
216 185 $ touch 'sp ace'
217 186 $ hg add 'sp ace'
@@ -228,13 +197,10 b' Test pre-72a89cf86fcd backward compatibi'
228 197 > odd.diffargs = --foo='\$clabel' '\$clabel' "--bar=\$clabel" "\$clabel"
229 198 > odd.executable = echo
230 199 > EOF
231 #if windows
200
232 201 $ hg --debug odd | grep '^running'
233 running '"*\\echo.exe" --foo="sp ace" "sp ace" --bar="sp ace" "sp ace"' in * (glob)
234 #else
235 $ hg --debug odd | grep '^running'
236 running "*/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob)
237 #endif
202 running '"*\\echo.exe" --foo="sp ace" "sp ace" --bar="sp ace" "sp ace"' in * (glob) (windows !)
203 running "*/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob) (no-windows !)
238 204
239 205 Empty argument must be quoted
240 206
@@ -244,13 +210,10 b' Empty argument must be quoted'
244 210 > [merge-tools]
245 211 > kdiff3.diffargs=--L1 \$plabel1 --L2 \$clabel \$parent \$child
246 212 > EOF
247 #if windows
213
248 214 $ hg --debug kdiff3 -r0 | grep '^running'
249 running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob)
250 #else
251 $ hg --debug kdiff3 -r0 | grep '^running'
252 running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob)
253 #endif
215 running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob) (windows !)
216 running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob) (no-windows !)
254 217
255 218 #if execbit
256 219
General Comments 0
You need to be logged in to leave comments. Login now