From d492b31cafe9aa5ce001b1d48815f4c0bb40d01a Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sat, 12 Jul 2008 17:47:52 +0200 Subject: t/: Use "test_must_fail git" instead of "! git" This patch changes every occurrence of "! git" -- with the meaning that a git call has to gracefully fail -- into "test_must_fail git". This is useful to - make sure the test does not fail because of a signal, e.g. SIGSEGV, and - advertise the use of "test_must_fail" for new tests. Signed-off-by: Stephan Beyer Signed-off-by: Junio C Hamano --- t/t4200-rerere.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 't/t4200-rerere.sh') diff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh index a64727d5ad..746d61f845 100755 --- a/t/t4200-rerere.sh +++ b/t/t4200-rerere.sh @@ -41,7 +41,7 @@ git commit -q -a -m second test_expect_success 'nothing recorded without rerere' ' (rm -rf .git/rr-cache; git config rerere.enabled false) && - ! git merge first && + test_must_fail git merge first && ! test -d .git/rr-cache ' @@ -50,7 +50,7 @@ test_expect_success 'conflicting merge' ' git reset --hard && mkdir .git/rr-cache && git config --unset rerere.enabled && - ! git merge first + test_must_fail git merge first ' sha1=$(sed -e 's/ .*//' .git/rr-cache/MERGE_RR) @@ -61,7 +61,7 @@ test_expect_success 'rerere.enabled works, too' ' rm -rf .git/rr-cache && git config rerere.enabled true && git reset --hard && - ! git merge first && + test_must_fail git merge first && grep ======= $rr/preimage ' @@ -120,7 +120,7 @@ test_expect_success 'another conflicting merge' ' git checkout -b third master && git show second^:a1 | sed "s/To die: t/To die! T/" > a1 && git commit -q -a -m third && - ! git pull . first + test_must_fail git pull . first ' git show first:a1 | sed 's/To die: t/To die! T/' > expect @@ -175,7 +175,7 @@ test_expect_success 'file2 added differently in two branches' ' echo Bello > file2 && git add file2 && git commit -m version2 && - ! git merge fourth && + test_must_fail git merge fourth && sha1=$(sed -e "s/ .*//" .git/rr-cache/MERGE_RR) && rr=.git/rr-cache/$sha1 && echo Cello > file2 && -- cgit v1.2.1