OSDN Git Service

tests: provide a new function: fail_
authorJim Meyering <meyering@redhat.com>
Tue, 17 Nov 2009 11:15:30 +0000 (12:15 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 24 Nov 2009 21:23:18 +0000 (22:23 +0100)
* tests/t-lib.sh (fail_): New function.

tests/t-lib.sh

index 76b6159..83efdf9 100644 (file)
@@ -30,6 +30,13 @@ skip_test_()
   Exit 77
 }
 
+fail_()
+{
+  echo "$0: failed test: $@" | head -1 1>&9
+  echo "$0: failed test: $@" 1>&2
+  Exit 1
+}
+
 getlimits_()
 {
     eval $(getlimits)