governance: keep repository root clean; remove marker file; implement repo detection via structure heuristic; update tests and system prompts/templates
This commit is contained in:
33
scripts/test.sh
Executable file
33
scripts/test.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
|
||||
if command -v bats >/dev/null 2>&1; then
|
||||
exec bats "$ROOT_DIR/tests"
|
||||
fi
|
||||
|
||||
# Minimal internal test runner (fallback when bats is not installed)
|
||||
echo "[info] bats not found; using internal test runner" >&2
|
||||
|
||||
failures=0
|
||||
total=0
|
||||
|
||||
for t in "$ROOT_DIR"/tests/*.sh; do
|
||||
[ -f "$t" ] || continue
|
||||
total=$((total+1))
|
||||
echo "[run] $t"
|
||||
if bash "$t"; then
|
||||
echo "[ok] $t"
|
||||
else
|
||||
echo "[fail] $t" >&2
|
||||
failures=$((failures+1))
|
||||
fi
|
||||
done
|
||||
|
||||
echo "[summary] total=$total failures=$failures"
|
||||
if [ "$failures" -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
|
Reference in New Issue
Block a user