diff options
-rwxr-xr-x | t/t0005-signals.sh | 4 | ||||
-rwxr-xr-x | t/t4026-color.sh | 6 | ||||
-rwxr-xr-x | t/t5004-archive-corner-cases.sh | 6 | ||||
-rwxr-xr-x | t/t5512-ls-remote.sh | 6 |
4 files changed, 13 insertions, 9 deletions
diff --git a/t/t0005-signals.sh b/t/t0005-signals.sh index aeea50c63..5c5707d71 100755 --- a/t/t0005-signals.sh +++ b/t/t0005-signals.sh @@ -10,8 +10,8 @@ one EOF test_expect_success 'sigchain works' ' - test-sigchain >actual - case "$?" in + { test-sigchain >actual; ret=$?; } && + case "$ret" in 143) true ;; # POSIX w/ SIGTERM=15 271) true ;; # ksh w/ SIGTERM=15 3) true ;; # Windows diff --git a/t/t4026-color.sh b/t/t4026-color.sh index 4d20feacf..2b32c4fbe 100755 --- a/t/t4026-color.sh +++ b/t/t4026-color.sh @@ -111,9 +111,9 @@ test_expect_success 'unknown color slots are ignored (branch)' ' ' test_expect_success 'unknown color slots are ignored (status)' ' - git config color.status.nosuchslotwilleverbedefined white || exit - git status - case $? in 0|1) : ok ;; *) false ;; esac + git config color.status.nosuchslotwilleverbedefined white && + { git status; ret=$?; } && + case $ret in 0|1) : ok ;; *) false ;; esac ' test_done diff --git a/t/t5004-archive-corner-cases.sh b/t/t5004-archive-corner-cases.sh index 305bcac6b..654addaae 100755 --- a/t/t5004-archive-corner-cases.sh +++ b/t/t5004-archive-corner-cases.sh @@ -66,8 +66,10 @@ test_expect_success UNZIP 'zip archive of empty tree is empty' ' # handle the empty repo at all, making our later check of its exit code # a no-op). But we cannot do anything reasonable except skip the test # on such platforms anyway, and this is the moral equivalent. - "$GIT_UNZIP" "$TEST_DIRECTORY"/t5004/empty.zip - expect_code=$? + { + "$GIT_UNZIP" "$TEST_DIRECTORY"/t5004/empty.zip + expect_code=$? + } && git archive --format=zip HEAD >empty.zip && make_dir extract && diff --git a/t/t5512-ls-remote.sh b/t/t5512-ls-remote.sh index 321c3e523..3bd9759e0 100755 --- a/t/t5512-ls-remote.sh +++ b/t/t5512-ls-remote.sh @@ -103,8 +103,10 @@ test_expect_success 'confuses pattern as remote when no remote specified' ' ' test_expect_success 'die with non-2 for wrong repository even with --exit-code' ' - git ls-remote --exit-code ./no-such-repository ;# not && - status=$? && + { + git ls-remote --exit-code ./no-such-repository + status=$? + } && test $status != 2 && test $status != 0 ' |