self tests: check new 'fatal_' function
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 7 Jun 2011 14:00:31 +0000 (16:00 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Jun 2011 10:23:22 +0000 (12:23 +0200)
* tests/self-check-exit.test: Also check the new 'fatal_'
function.

ChangeLog
tests/self-check-report.test

index 6ada906..40c0d65 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2011-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       self tests: check new 'fatal_' function
+       * tests/self-check-exit.test: Also check the new 'fatal_'
+       function.
+
+2011-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        test defs: new function 'fatal_', for hard errors
        Before this patch, the only way offered by tests/defs to
        properly signal a hard error was the `framework_failure_'
index e04c88e..5434d5a 100755 (executable)
@@ -31,6 +31,8 @@ exec 5>&1
 (fail_ foo) 2>&1 1>&5 | grep "^$me: failed test: foo"  || Exit 1
 (skip_ foo); test $? -eq 77                            || Exit 1
 (skip_ foo) 2>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
+(fatal_ foo); test $? -eq 99                           || Exit 1
+(fatal_ foo) 2>&1 1>&5 | grep "^$me: hard error: foo"  || Exit 1
 (framework_failure_ foo); test $? -eq 99               || Exit 1
 (framework_failure_ foo) 2>&1 1>&5 \
   | grep "^$me: set-up failure: foo"                   || Exit 1
@@ -42,6 +44,8 @@ stderr_fileno_=6
 (fail_ foo) 6>&1 1>&5 | grep "^$me: failed test: foo"  || Exit 1
 (skip_ foo); test $? -eq 77                            || Exit 1
 (skip_ foo) 6>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
+(fatal_ foo); test $? -eq 99                           || Exit 1
+(fatal_ foo) 6>&1 1>&5 | grep "^$me: hard error: foo"  || Exit 1
 (framework_failure_ foo); test $? -eq 99               || Exit 1
 (framework_failure_ foo) 6>&1 1>&5 \
   | grep "^$me: set-up failure: foo"                   || Exit 1