44 lines
2.2 KiB
Bash
44 lines
2.2 KiB
Bash
#!/usr/bin/env bash
|
|
# tests/fix-round-4-5b-part-2-red.sh
|
|
# The red proof of fix round 4-5b, part 2 (plan
|
|
# .claude/projects/2026-10-27-fix-round-4-5b-part-2, decision 88), as a
|
|
# wrapper over the shared red script tests/helpers/red-round.sh. Every id of
|
|
# the round has tests whose names start with "[id]"; each of them must fail
|
|
# on an assertion at the round's start point 52c382c.
|
|
# This wrapper passes the shared script:
|
|
# --base BASE, --ids IDS (the round's 5 ids), the round's FILES;
|
|
# --other-ids: the ids of fix round 4-5a and of 4-5b part 1, read with sed
|
|
# from the IDS= lines of tests/fix-round-4-5a-red.sh and
|
|
# tests/fix-round-4-5b-red.sh and passed as ONE value, 4-5a's first (the
|
|
# shared script keeps only the last --other-ids it is given); a tag on
|
|
# that list is not judged, so the [ARG] tests in bash-guard.test.mjs are
|
|
# left to part 1;
|
|
# --mutations tests/fix-round-4-5b-part-2-mutations.mjs (empty: every id is
|
|
# red at the start point on its own code).
|
|
# No --require-sha256: the round has no SHA-256 test.
|
|
# Exit 0 all red, 1 a rule broken (the judge names it), 2 a setup failure
|
|
# (also: no ids on either older IDS= line); never 0 on a setup failure.
|
|
# bash 3.2 compatible, ASCII only, no arrays.
|
|
|
|
set -u
|
|
set -f
|
|
|
|
cd "$(dirname "$0")/.." || { echo "red script: setup failure: cannot cd to the repo root" >&2; exit 2; }
|
|
ROOT="$(pwd -P)"
|
|
|
|
BASE=52c382c19885819d747bbcb23a34ae2015470f97
|
|
IDS='TOK HDG CKI DLC KI'
|
|
FILES='tests/lib/arg-parser-tokenize.test.mjs tests/hooks/bash-guard.test.mjs tests/lib/review-recurrence-check-ignore.test.mjs tests/lib/fix-round-4-5b-part-2-prose.test.mjs'
|
|
|
|
OTHER_A=$(sed -n "s/^IDS='\(.*\)'\$/\1/p" "$ROOT/tests/fix-round-4-5a-red.sh")
|
|
if [ -z "$OTHER_A" ]; then
|
|
echo "red script: setup failure: no ids on the IDS= line of $ROOT/tests/fix-round-4-5a-red.sh" >&2
|
|
exit 2
|
|
fi
|
|
OTHER_B=$(sed -n "s/^IDS='\(.*\)'\$/\1/p" "$ROOT/tests/fix-round-4-5b-red.sh")
|
|
if [ -z "$OTHER_B" ]; then
|
|
echo "red script: setup failure: no ids on the IDS= line of $ROOT/tests/fix-round-4-5b-red.sh" >&2
|
|
exit 2
|
|
fi
|
|
|
|
exec /bin/bash "$ROOT/tests/helpers/red-round.sh" --base "$BASE" --ids "$IDS" --other-ids "$OTHER_A $OTHER_B" --mutations "$ROOT/tests/fix-round-4-5b-part-2-mutations.mjs" $FILES
|