# Shared assertion helpers for the shell test scripts. Sourced, not run. # # Each test_*.sh increments PASS_COUNT/FAIL_COUNT/SKIP_COUNT as it goes and # prints one line per check, so a caller sees passed/skipped/failed as # separate numbers rather than a single pass/fail verdict -- a skip must # never read as a pass. PASS_COUNT=0 FAIL_COUNT=0 SKIP_COUNT=0 pass() { PASS_COUNT=$((PASS_COUNT + 1)); echo "PASS: $1"; } fail() { FAIL_COUNT=$((FAIL_COUNT + 1)); echo "FAIL: $1" >&2; } skip() { SKIP_COUNT=$((SKIP_COUNT + 1)); echo "SKIP: $1"; } assert_success() { # assert_success