Files

32 lines
708 B
Bash
Executable File

#!/usr/bin/env bash
# Runs every tests/*.test.sh in this directory. Phase 2+ adds real suites;
# for now it only validates the scaffold itself.
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
fail=0
echo "== plugin.json is valid JSON =="
python3 -c "import json; json.load(open('../.claude-plugin/plugin.json'))"
echo "== design docs present =="
for f in spec.md plan.md rubric.md tasks.md; do
if [ ! -f "../design/$f" ]; then
echo "MISSING: design/$f" >&2
fail=1
fi
done
shopt -s nullglob
suites=(./*.test.sh)
if [ ${#suites[@]} -eq 0 ]; then
echo "== no suites yet (Phase 2+) =="
else
for suite in "${suites[@]}"; do
echo "== $suite =="
bash "$suite" || fail=1
done
fi
exit "$fail"