diff options
author | Jeff King <peff@peff.net> | 2015-03-20 06:11:46 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-03-20 10:20:16 -0700 |
commit | c21fc9d0ab217d6e3cf01ee895e827b72d8207b6 (patch) | |
tree | 46e5f6bca004507e9f1f1f47c438afa2fad61b5f /t/t0040-parse-options.sh | |
parent | 35da1bf5d6d51fe62d4d646c306c5cf5182a881e (diff) | |
download | git-c21fc9d0ab217d6e3cf01ee895e827b72d8207b6.tar.gz |
t: use test_expect_code instead of hand-rolled comparison
This makes our output in the event of a failure slightly
nicer, and it means that we do not break the &&-chain.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t0040-parse-options.sh')
-rwxr-xr-x | t/t0040-parse-options.sh | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/t/t0040-parse-options.sh b/t/t0040-parse-options.sh index a90c86bfa3..b044785175 100755 --- a/t/t0040-parse-options.sh +++ b/t/t0040-parse-options.sh @@ -172,12 +172,9 @@ test_expect_success 'long options' ' ' test_expect_success 'missing required value' ' - test-parse-options -s; - test $? = 129 && - test-parse-options --string; - test $? = 129 && - test-parse-options --file; - test $? = 129 + test_expect_code 129 test-parse-options -s && + test_expect_code 129 test-parse-options --string && + test_expect_code 129 test-parse-options --file ' cat > expect << EOF @@ -227,8 +224,7 @@ test_expect_success 'unambiguously abbreviated option with "="' ' ' test_expect_success 'ambiguously abbreviated option' ' - test-parse-options --strin 123; - test $? = 129 + test_expect_code 129 test-parse-options --strin 123 ' cat > expect << EOF |