Code

t/: Use "test_must_fail git" instead of "! git"
[git.git] / t / t4200-rerere.sh
index a64727d5ad00cb222e3020b6702e4f89e212039c..746d61f8451d42b8a62d2e7afb9bde5256ff592b 100755 (executable)
@@ -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 &&