chore: scaffold tracks and tooling
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
6dc5bdde9e
commit
e150b7fefb
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
# Usage: scripts/check-stubs.sh <js|scala|fsharp>
|
||||
# Runs each module M01..M11 that has tests against the stubs in src/. Fails if any module's tests pass.
|
||||
set -uo pipefail
|
||||
track="${1:?usage: check-stubs.sh <js|scala|fsharp>}"
|
||||
repo="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
dir="$repo/$track"
|
||||
case "$track" in
|
||||
js) has() { compgen -G "$dir/test/m$1-*.test.js" >/dev/null; } ;;
|
||||
scala) has() { compgen -G "$dir/test/M$1*.test.scala" >/dev/null; } ;;
|
||||
fsharp) has() { compgen -G "$dir/tests/M$1*.fs" >/dev/null; } ;;
|
||||
*) echo "unknown track: $track" >&2; exit 2 ;;
|
||||
esac
|
||||
status=0
|
||||
for n in 01 02 03 04 05 06 07 08 09 10 11; do
|
||||
m="M$n"
|
||||
if ! has "$n"; then echo "$m: no tests"; continue; fi
|
||||
if (cd "$dir" && ./test.sh "$m") >/dev/null 2>&1; then
|
||||
echo "$m: FAIL (tests pass against stubs)"; status=1
|
||||
else
|
||||
echo "$m: ok (fails against stubs)"
|
||||
fi
|
||||
done
|
||||
exit $status
|
||||
Reference in New Issue
Block a user