diff options
author | Jeff King <peff@peff.net> | 2010-08-31 11:56:53 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-08-31 09:54:37 -0700 |
commit | a54ce3ca9e780f824f07519a6db83fe2d7575734 (patch) | |
tree | e3a174d66ae4194a11e3eca1dddfe24f56b0e4dc | |
parent | 16034fbe59e88ec9592f73523cde97714d7c727c (diff) | |
download | git-a54ce3ca9e780f824f07519a6db83fe2d7575734.tar.gz git-a54ce3ca9e780f824f07519a6db83fe2d7575734.tar.xz |
tests: make test_must_fail fail on missing commands
The point of it is to run a command that produces failure. A
missing command is more likely an error in the test script
(e.g., using 'test_must_fail "command with arguments"', or
relying on a missing command).
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-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 285bfd894..dbb13af33 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -598,6 +598,9 @@ test_must_fail () { elif test $exit_code -gt 129 -a $exit_code -le 192; then echo >&2 "test_must_fail: died by signal: $*" return 1 + elif test $exit_code = 127; then + echo >&2 "test_must_fail: command not found: $*" + return 1 fi return 0 } |