diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2010-08-31 12:26:57 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-31 11:40:20 -0700 |
commit | d0b8a61742714b93b614f9823491a7557879dfb9 (patch) | |
tree | 1546925934cd9be44f0dc8c286bb42237d14b34d /t | |
parent | 5c8e141414058430155ea179bce38ceb8d750c5d (diff) | |
download | git-d0b8a61742714b93b614f9823491a7557879dfb9.tar.gz git-d0b8a61742714b93b614f9823491a7557879dfb9.tar.xz |
tests: make test_might_fail fail on missing commands
Detect and report hard-to-notice spelling mistakes like
test_might_fail "git config --unset whatever"
(the extra quotes prevent the shell from running git as intended;
instead, the shell looks for a "git config --unset whatever" file).
Cc: Jeff King <peff@peff.net>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r-- | t/test-lib.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 16ceb5316..7da490de0 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -622,6 +622,9 @@ test_might_fail () { if test $exit_code -gt 129 -a $exit_code -le 192; then echo >&2 "test_might_fail: died by signal: $*" return 1 + elif test $exit_code = 127; then + echo >&2 "test_might_fail: command not found: $*" + return 1 fi return 0 } |