summaryrefslogtreecommitdiffstatshomepage
path: root/test/tst-should-fail.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/tst-should-fail.sh')
-rw-r--r--test/tst-should-fail.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/tst-should-fail.sh b/test/tst-should-fail.sh
new file mode 100644
index 0000000..98d22f5
--- /dev/null
+++ b/test/tst-should-fail.sh
@@ -0,0 +1,16 @@
+test_run() {
+ cat > "$test_root_dir/$test_file" <<'EOF'
+test_should_fail=1
+
+test_run() {
+ log "I'm a failure"
+ false
+}
+EOF
+
+ local output
+ output="$( test_run_harness )"
+
+ test_check_harness_log "$output" "$test_file | I'm a failure"
+ test_check_harness_summary "$output" 1 0
+}