[PATCH 1/2] tests: provide a new function: fail_

Jim Meyering meyering at redhat.com
Tue Nov 17 11:15:30 UTC 2009


* tests/t-lib.sh (fail_): New function.
---
 tests/t-lib.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/tests/t-lib.sh b/tests/t-lib.sh
index 76b6159..83efdf9 100644
--- a/tests/t-lib.sh
+++ b/tests/t-lib.sh
@@ -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)
--
1.6.6.rc0.236.ge0b94




More information about the parted-devel mailing list