##// 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 Should diff cloned files directly:
63 Should diff cloned files directly:
64
64
65 #if windows
66 $ hg falabala -r 0:1
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 [1]
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 Specifying an empty revision should abort.
70 Specifying an empty revision should abort.
76
71
@@ -92,41 +87,27 b' Test diff during merge:'
92
87
93 Should diff cloned file against wc file:
88 Should diff cloned file against wc file:
94
89
95 #if windows
96 $ hg falabala
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 [1]
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 Test --change option:
96 Test --change option:
107
97
108 $ hg ci -d '2 0' -mtest3
98 $ hg ci -d '2 0' -mtest3
109 #if windows
99
110 $ hg falabala -c 1
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 [1]
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 Check diff are made from the first parent:
105 Check diff are made from the first parent:
120
106
121 #if windows
122 $ hg falabala -c 3 || echo "diff-like tools yield a non-zero exit code"
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 diff-like tools yield a non-zero exit code
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 issue3153: ensure using extdiff with removed subrepos doesn't crash:
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 > EOF
139 > EOF
159 $ hg update -q -C 0
140 $ hg update -q -C 0
160 $ echo a >> a
141 $ echo a >> a
161 #if windows
142
162 $ hg --debug 4463a | grep '^running'
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 $ hg --debug 4463b | grep '^running'
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 $ hg --debug echo | grep '^running'
149 $ hg --debug echo | grep '^running'
167 running '*echo* "*\\a" "*\\a"' in */extdiff.* (glob)
150 running '*echo* "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
168 #else
151 running '*echo */a $TESTTMP/a/a' in */extdiff.* (glob) (no-windows !)
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
176
152
177 (getting options from other than extdiff section)
153 (getting options from other than extdiff section)
178
154
@@ -189,29 +165,22 b' issue4463: usage of command line configu'
189 > [merge-tools]
165 > [merge-tools]
190 > 4463b3.diffargs = b3-naked 'single quoted' "double quoted"
166 > 4463b3.diffargs = b3-naked 'single quoted' "double quoted"
191 > EOF
167 > EOF
192 #if windows
168
193 $ hg --debug 4463b2 | grep '^running'
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 $ hg --debug 4463b3 | grep '^running'
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 $ hg --debug 4463b4 | grep '^running'
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 $ hg --debug 4463b4 --option b4-naked --option 'being quoted' | grep '^running'
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 $ hg --debug extdiff -p echo --option echo-naked --option 'being quoted' | grep '^running'
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)
182 running 'echo echo-naked "being quoted" "*\\a" "*\\a"' in */extdiff.* (glob) (windows !)
203 #else
183 running "echo echo-naked 'being quoted' */a $TESTTMP/a/a" in */extdiff.* (glob) (no-windows !)
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
215
184
216 $ touch 'sp ace'
185 $ touch 'sp ace'
217 $ hg add 'sp ace'
186 $ hg add 'sp ace'
@@ -228,13 +197,10 b' Test pre-72a89cf86fcd backward compatibi'
228 > odd.diffargs = --foo='\$clabel' '\$clabel' "--bar=\$clabel" "\$clabel"
197 > odd.diffargs = --foo='\$clabel' '\$clabel' "--bar=\$clabel" "\$clabel"
229 > odd.executable = echo
198 > odd.executable = echo
230 > EOF
199 > EOF
231 #if windows
200
232 $ hg --debug odd | grep '^running'
201 $ hg --debug odd | grep '^running'
233 running '"*\\echo.exe" --foo="sp ace" "sp ace" --bar="sp ace" "sp ace"' in * (glob)
202 running '"*\\echo.exe" --foo="sp ace" "sp ace" --bar="sp ace" "sp ace"' in * (glob) (windows !)
234 #else
203 running "*/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob) (no-windows !)
235 $ hg --debug odd | grep '^running'
236 running "*/echo --foo='sp ace' 'sp ace' --bar='sp ace' 'sp ace'" in * (glob)
237 #endif
238
204
239 Empty argument must be quoted
205 Empty argument must be quoted
240
206
@@ -244,13 +210,10 b' Empty argument must be quoted'
244 > [merge-tools]
210 > [merge-tools]
245 > kdiff3.diffargs=--L1 \$plabel1 --L2 \$clabel \$parent \$child
211 > kdiff3.diffargs=--L1 \$plabel1 --L2 \$clabel \$parent \$child
246 > EOF
212 > EOF
247 #if windows
213
248 $ hg --debug kdiff3 -r0 | grep '^running'
214 $ hg --debug kdiff3 -r0 | grep '^running'
249 running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob)
215 running 'echo --L1 "@0" --L2 "" a.8a5febb7f867 a' in * (glob) (windows !)
250 #else
216 running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob) (no-windows !)
251 $ hg --debug kdiff3 -r0 | grep '^running'
252 running "echo --L1 '@0' --L2 '' a.8a5febb7f867 a" in * (glob)
253 #endif
254
217
255 #if execbit
218 #if execbit
256
219
General Comments 0
You need to be logged in to leave comments. Login now