diff options
Diffstat (limited to 'testprogs/blackbox')
-rwxr-xr-x | testprogs/blackbox/subunit.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/testprogs/blackbox/subunit.sh b/testprogs/blackbox/subunit.sh index cee8cf6f45..e16aee76ca 100755 --- a/testprogs/blackbox/subunit.sh +++ b/testprogs/blackbox/subunit.sh @@ -65,3 +65,18 @@ testit () { 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 +} |