summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2007-12-02 00:40:37 +0100
committerHans Ulrich Niedermann <hun@n-dimensional.de>2008-07-19 00:56:20 +0200
commit57f3872e7eb7ba399aa8e6be6589fbaae3255ef9 (patch)
tree1d3f703b9fe1db9bcdb51d45014b997cd4857f8e
parente5e89e39df3ab9741495f10eb97e38211238c913 (diff)
downloadndim-git-utils-57f3872e7eb7ba399aa8e6be6589fbaae3255ef9.tar.gz
ndim-git-utils-57f3872e7eb7ba399aa8e6be6589fbaae3255ef9.tar.xz
ndim-git-utils-57f3872e7eb7ba399aa8e6be6589fbaae3255ef9.zip
Fix git-check-commit-msg test script
Run proper test for missing test case files. Return proper exit code.
-rwxr-xr-xgit-check-commit-msg/run-tests.sh6
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