From 077910c9030c3e39ff6595e4954d9d88f8d2954e Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Tue, 20 Jan 2026 06:54:47 -0600 Subject: Fix full-test.sh exiting after first passed test Bug: ((TESTS_PASSED++)) returns exit code 1 when TESTS_PASSED is 0, because post-increment evaluates the old value (0) which is falsy. With set -e, this caused the script to exit after the first test passed. Fix: Use pre-increment ((++TESTS_PASSED)) which returns the new value. --- scripts/full-test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/full-test.sh') diff --git a/scripts/full-test.sh b/scripts/full-test.sh index 085e248..811dfa6 100755 --- a/scripts/full-test.sh +++ b/scripts/full-test.sh @@ -71,7 +71,7 @@ FAILED_TESTS=() info() { echo -e "${GREEN}[INFO]${NC} $1"; } warn() { echo -e "${YELLOW}[WARN]${NC} $1"; } error() { echo -e "${RED}[ERROR]${NC} $1"; } -pass() { echo -e "${GREEN}[PASS]${NC} $1"; ((TESTS_PASSED++)); } +pass() { echo -e "${GREEN}[PASS]${NC} $1"; ((++TESTS_PASSED)); } fail() { echo -e "${RED}[FAIL]${NC} $1"; ((TESTS_FAILED++)); FAILED_TESTS+=("$1"); } banner() { -- cgit v1.2.3