Skip to content

Commit 65747a1

Browse files
committed
fix: guard prevents re-declaration
1 parent bef7476 commit 65747a1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/runner.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# shellcheck disable=SC2155
33

44
# Pre-compiled regex pattern for parsing test result assertions
5-
# Used in runner::parse_result_sync() to extract assertion counts and exit codes
6-
declare -r RUNNER_PARSE_RESULT_REGEX='ASSERTIONS_FAILED=([0-9]*)##ASSERTIONS_PASSED=([0-9]*)##'\
5+
if [[ -z ${RUNNER_PARSE_RESULT_REGEX+x} ]]; then
6+
declare -r RUNNER_PARSE_RESULT_REGEX='ASSERTIONS_FAILED=([0-9]*)##ASSERTIONS_PASSED=([0-9]*)##'\
77
'ASSERTIONS_SKIPPED=([0-9]*)##ASSERTIONS_INCOMPLETE=([0-9]*)##ASSERTIONS_SNAPSHOT=([0-9]*)##'\
88
'TEST_EXIT_CODE=([0-9]*)'
9+
fi
910

1011
function runner::load_test_files() {
1112
local filter=$1

0 commit comments

Comments
 (0)