Get more formal about testing

This commit is contained in:
David Heinemeier Hansson
2026-05-25 13:08:56 +02:00
parent 162e6ce006
commit 81f4896879
5 changed files with 33 additions and 264 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/bin/bash
set -euo pipefail
ROOT=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)
TEST_DIR="$ROOT/test/shell"
shopt -s nullglob
tests=("$TEST_DIR"/*-test.sh)
shopt -u nullglob
if (( ${#tests[@]} == 0 )); then
echo "No shell tests found in $TEST_DIR" >&2
exit 1
fi
for test in "${tests[@]}"; do
printf '==> %s\n' "${test#$ROOT/}"
bash "$test"
done