The testit_expect_failure() function is like the testit() function, with
reversed error detection logic. This reversal only affects the pass/fail logic
and logging - the original return code from the command is still returned to the
calling script.
fi
return $status
}
+
+testit_expect_failure () {
+ name="$1"
+ shift
+ cmdline="$*"
+ subunit_start_test "$name"
+ output=`$cmdline 2>&1`
+ status=$?
+ if [ x$status = x0 ]; then
+ echo "$output" | subunit_fail_test "$name"
+ else
+ subunit_pass_test "$name"
+ fi
+ return $status
+}