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-filter.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-filter.sh')
| -rw-r--r-- | test/tst-filter.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/tst-filter.sh b/test/tst-filter.sh new file mode 100644 index 0000000..3707f6d --- /dev/null +++ b/test/tst-filter.sh @@ -0,0 +1,23 @@ +test_run() { + local i + for i in 1 2 3; do + cat > "$test_root_dir/tst-$i.sh" <<EOF +test_run() { + log "Hello from test #$i" +} +EOF + done + + local output + output="$( test_run_harness )" + + test_check_harness_log "$output" "tst-1.sh | Hello from test #1" + test_check_harness_log "$output" "tst-2.sh | Hello from test #2" + test_check_harness_log "$output" "tst-3.sh | Hello from test #3" + test_check_harness_summary "$output" 3 0 + + output="$( test_run_harness -f '*2*' )" + + test_check_harness_log "$output" "tst-2.sh | Hello from test #2" + test_check_harness_summary "$output" 1 0 +} |
