From: Jeff King <peff@peff.net>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Felipe Contreras <felipe.contreras@gmail.com>,
Jeff King <peff@peff.net>
Subject: [PATCH 1/3] t1300: use test_must_fail as appropriate
Date: Sat, 7 Mar 2009 12:14:04 -0500 [thread overview]
Message-ID: <1236446046-18319-2-git-send-email-peff@peff.net> (raw)
In-Reply-To: <1236446046-18319-1-git-send-email-peff@peff.net>
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>
---
Just a cleanup I noticed when one of the tests failed for me.
t/t1300-repo-config.sh | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/t/t1300-repo-config.sh b/t/t1300-repo-config.sh
index 11b82f4..3c06842 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]
--
1.6.2.195.g44251.dirty
next prev parent reply other threads:[~2009-03-07 17:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-07 17:14 [PATCH 0/3] config --bool-or-int fixes Jeff King
2009-03-07 17:14 ` Jeff King [this message]
2009-03-07 17:14 ` [PATCH 2/3] config: set help text for --bool-or-int Jeff King
2009-03-07 21:07 ` Felipe Contreras
2009-03-07 22:48 ` Jeff King
2009-03-09 21:50 ` Felipe Contreras
2009-03-10 17:59 ` Jeff King
2009-03-07 17:14 ` [PATCH 3/3] document config --bool-or-int Jeff King
2009-03-07 17:16 ` [PATCH 0/3] config --bool-or-int fixes Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1236446046-18319-2-git-send-email-peff@peff.net \
--to=peff@peff.net \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).