diff options
| author | Egor Tensin <egor@tensin.name> | 2026-10-15 18:19:25 +0500 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-10-15 18:19:25 +0500 |
| commit | 1e1d21c2a2266eff74db9d46fa7efd073fb44677 (patch) | |
| tree | 3fc8b8c5c1ed488dd4e0123b8093fc447f9471d9 /test/tst-fail.sh | |
| parent | don't fail if lib/ doesn't exist (diff) | |
| download | test-harness-1e1d21c2a2266eff74db9d46fa7efd073fb44677.tar.gz test-harness-1e1d21c2a2266eff74db9d46fa7efd073fb44677.zip | |
add a couple of basic tests
Diffstat (limited to 'test/tst-fail.sh')
| -rw-r--r-- | test/tst-fail.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/tst-fail.sh b/test/tst-fail.sh new file mode 100644 index 0000000..3c12ee3 --- /dev/null +++ b/test/tst-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" 0 1 +} |
