From 2b3caddbb0193308e787d4348e4ee45caf37a38e Mon Sep 17 00:00:00 2001 From: Chemaclass Date: Wed, 3 Jun 2026 11:40:18 +0200 Subject: [PATCH] fix(test): make _supports_wait_n test set -e safe On Bash < 4.3 bashunit::runner::_supports_wait_n returns 1; called as a bare statement under --strict (set -euo pipefail) it aborted the test body, which cascaded into the rest of parallel_test.sh erroring. Capture the rc with '|| actual_rc=$?' instead. Only surfaced on Bash 3.x, which CI never exercises under --strict. --- tests/unit/parallel_test.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/unit/parallel_test.sh b/tests/unit/parallel_test.sh index a280e716..c190bd1b 100644 --- a/tests/unit/parallel_test.sh +++ b/tests/unit/parallel_test.sh @@ -63,8 +63,9 @@ function test_supports_wait_n_matches_running_bash_version() { expected_rc=0 fi - bashunit::runner::_supports_wait_n - assert_same "$expected_rc" "$?" + local actual_rc=0 + bashunit::runner::_supports_wait_n || actual_rc=$? + assert_same "$expected_rc" "$actual_rc" } function test_wait_for_job_slot_releases_when_background_job_finishes() {