Navigation Menu

Skip to content

Commit

Permalink
t7600-merge: Use test_expect_failure to test option parsing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Sixt authored and gitster committed Jul 16, 2008
1 parent f66cf96 commit 01941bd
Showing 1 changed file with 6 additions and 30 deletions.
36 changes: 6 additions & 30 deletions t/t7600-merge.sh
Expand Up @@ -222,36 +222,12 @@ test_expect_success 'setup' '
test_debug 'gitk --all'

test_expect_success 'test option parsing' '
if git merge -$ c1
then
echo "[OOPS] -$ accepted"
false
fi &&
if git merge --no-such c1
then
echo "[OOPS] --no-such accepted"
false
fi &&
if git merge -s foobar c1
then
echo "[OOPS] -s foobar accepted"
false
fi &&
if git merge -s=foobar c1
then
echo "[OOPS] -s=foobar accepted"
false
fi &&
if git merge -m
then
echo "[OOPS] missing commit msg accepted"
false
fi &&
if git merge
then
echo "[OOPS] missing commit references accepted"
false
fi
test_must_fail git merge -$ c1 &&
test_must_fail git merge --no-such c1 &&
test_must_fail git merge -s foobar c1 &&
test_must_fail git merge -s=foobar c1 &&
test_must_fail git merge -m &&
test_must_fail git merge
'

test_expect_success 'merge c0 with c1' '
Expand Down

0 comments on commit 01941bd

Please sign in to comment.