diff options
| author | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-12-02 00:40:37 +0100 |
|---|---|---|
| committer | Hans Ulrich Niedermann <hun@n-dimensional.de> | 2007-12-02 00:40:37 +0100 |
| commit | 1fd9cc897a76128b7cec954a90063d372aa124a9 (patch) | |
| tree | 5c5dc9f8564f764980cb5ba1b18d8d672d648956 | |
| parent | fdabb0e9bcde5fe31071ce38fcab5a0483fcf03c (diff) | |
Fix git-check-commit-msg test script
Run proper test for missing test case files.
Return proper exit code.
| -rwxr-xr-x | git-check-commit-msg/run-tests.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/git-check-commit-msg/run-tests.sh b/git-check-commit-msg/run-tests.sh index d3da61c..3b43f16 100755 --- a/git-check-commit-msg/run-tests.sh +++ b/git-check-commit-msg/run-tests.sh @@ -8,7 +8,10 @@ errors=0 while read tc expect restofline do tcfile="${tcdir}/git-check-commit-msg/${tc}" - test -s "$tcfile" || continue + test -f "$tcfile" || { + echo "$0: Fatal: Test file $tcfile not found." >&2 + exit 1 + } "$script" "$tcfile"; s="$?" @@ -26,3 +29,4 @@ commit-3 OK EOF [ "$errors" -ne 0 ] && exit 1 +exit 0 |
