bunpen: rearrange integration tests to make it obvious that invoking by PATH is what's failing

This commit is contained in:
2024-09-05 22:51:21 +00:00
parent a128f624b2
commit 768998f78d

View File

@@ -31,27 +31,23 @@ test_06_propagates_rc() {
bunpen --bunpen-path / /usr/bin/env false && return 1 || true bunpen --bunpen-path / /usr/bin/env false && return 1 || true
} }
test_07_propagates_rc_invoke_by_path() { test_07_forwards_stdout_when_disabled() {
bunpen --bunpen-path / false && return 1 || true local stdout=$(BUNPEN_DISABLE=1 bunpen --bunpen-path / /usr/bin/env echo "hello")
}
test_08_forwards_stdout_when_disabled() {
local stdout=$(BUNPEN_DISABLE=1 bunpen --bunpen-path / echo "hello")
test "$stdout" = "hello" test "$stdout" = "hello"
} }
test_09_forwards_stdout() { test_08_forwards_stdout() {
local stdout=$(bunpen --bunpen-path / echo "hello") local stdout=$(bunpen --bunpen-path / /usr/bin/env echo "hello")
test "$stdout" = "hello" test "$stdout" = "hello"
} }
test_10_no_logging_by_default() { test_09_no_logging_by_default() {
local stdout=$(bunpen --bunpen-path / true) local stdout=$(bunpen --bunpen-path / /usr/bin/env true)
test -z "$stdout" test -z "$stdout"
} }
test_11_logs_something() { test_10_logs_something() {
local stdout=$(bunpen --bunpen-debug=4 --bunpen-path / true 2>&1) local stdout=$(bunpen --bunpen-debug=4 --bunpen-path / /usr/bin/env true 2>&1)
test -n "$stdout" test -n "$stdout"
} }