aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/tst-fail.sh
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-10-15 18:19:25 +0500
committerEgor Tensin <egor@tensin.name>2026-10-15 18:19:25 +0500
commit1e1d21c2a2266eff74db9d46fa7efd073fb44677 (patch)
tree3fc8b8c5c1ed488dd4e0123b8093fc447f9471d9 /test/tst-fail.sh
parentdon't fail if lib/ doesn't exist (diff)
downloadtest-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.sh16
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
+}