@matheusbsbs / matheus-bagliano / commits / 01941bd543
Fork 0

t7600-merge: Use test_expect_failure to test option parsing

It used plain 'if git merge ...', which hides a segfault. The test does not pass. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Sixt committed Jul 16, 2008 at 10:33 UTC 01941bd54387aee029315d565f0bc1a5b9c5541a
1 file changed +6 -30
t/t7600-merge.sh
+6 -30
@@ -222,36 +222,12 @@ test_expect_success 'setup' '
222 test_debug 'gitk --all'
223
224 test_expect_success 'test option parsing' '
225 - if git merge -$ c1
226 - then
227 - echo "[OOPS] -$ accepted"
228 - false
229 - fi &&
230 - if git merge --no-such c1
231 - then
232 - echo "[OOPS] --no-such accepted"
233 - false
234 - fi &&
235 - if git merge -s foobar c1
236 - then
237 - echo "[OOPS] -s foobar accepted"
238 - false
239 - fi &&
240 - if git merge -s=foobar c1
241 - then
242 - echo "[OOPS] -s=foobar accepted"
243 - false
244 - fi &&
245 - if git merge -m
246 - then
247 - echo "[OOPS] missing commit msg accepted"
248 - false
249 - fi &&
250 - if git merge
251 - then
252 - echo "[OOPS] missing commit references accepted"
253 - false
254 - fi
225 + test_must_fail git merge -$ c1 &&
226 + test_must_fail git merge --no-such c1 &&
227 + test_must_fail git merge -s foobar c1 &&
228 + test_must_fail git merge -s=foobar c1 &&
229 + test_must_fail git merge -m &&
230 + test_must_fail git merge
231 '
232
233 test_expect_success 'merge c0 with c1' '