diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-15 21:01:48 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-15 21:01:48 +0500 |
| commit | 9f07b36c4480a3e8e2a46906748bee28e7780f10 (patch) | |
| tree | 3c8a875e686be7992ad3724e9db90eaa93f86197 /test/tst-should-fail.sh | |
| parent | test: add a new test (diff) | |
| download | test-harness-1.0.2.tar.gz test-harness-1.0.2.zip | |
test: add new tests, fix old onesv1.0.2
Diffstat (limited to 'test/tst-should-fail.sh')
| -rw-r--r-- | test/tst-should-fail.sh | 16 |
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 +} |
