aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-03-07 12:14:04 -0500
committerJunio C Hamano <gitster@pobox.com>2009-03-07 11:28:53 -0800
commit003f69b282f9cc54da771e1b3e9378aa3f5178cd (patch)
tree5d49e931cdcd1eb49413cd5daa0b8edd89602a6c
parentc2e9364a06df55e70d7652d37bb4d712f6b3bb3e (diff)
downloadgit-003f69b282f9cc54da771e1b3e9378aa3f5178cd.tar.gz
git-003f69b282f9cc54da771e1b3e9378aa3f5178cd.tar.xz
t1300: use test_must_fail as appropriate
Some of the tests checked the exit code manually, even going so far as to run git outside of the test_expect harness. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rwxr-xr-xt/t1300-repo-config.sh10
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 11b82f43d..3c06842d9 100755
--- a/t/t1300-repo-config.sh
+++ b/t/t1300-repo-config.sh
@@ -336,10 +336,10 @@ test_expect_success 'get bool variable with empty value' \
'git config --bool emptyvalue.variable > output &&
cmp output expect'
-git config > output 2>&1
-
-test_expect_success 'no arguments, but no crash' \
- "test $? = 129 && grep usage output"
+test_expect_success 'no arguments, but no crash' '
+ test_must_fail git config >output 2>&1 &&
+ grep usage output
+'
cat > .git/config << EOF
[a.b]
@@ -373,7 +373,7 @@ EOF
test_expect_success 'new variable inserts into proper section' 'cmp .git/config expect'
test_expect_success 'alternative GIT_CONFIG (non-existing file should fail)' \
- 'git config --file non-existing-config -l; test $? != 0'
+ 'test_must_fail git config --file non-existing-config -l'
cat > other-config << EOF
[ein]