From 8e9dfdbabe0f721e64fd39baa3a0f388c81b65ad Mon Sep 17 00:00:00 2001 From: nsfisis Date: Wed, 13 Aug 2025 02:06:59 +0900 Subject: feat: add 2 example files --- tests/all.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'tests/all.sh') diff --git a/tests/all.sh b/tests/all.sh index 70776cf..ce7ab6d 100644 --- a/tests/all.sh +++ b/tests/all.sh @@ -2,13 +2,18 @@ set -e rm -rf tests/tmp mkdir -p tests/tmp -for i in $(seq 1 999); do - testcase=$(printf '%03d' $i) + +for filename in tests/*.sh; do + testcase_="$(basename "$filename")" + testcase="${testcase_/%.sh/}" test_file="tests/$testcase.sh" - if [[ -f "$test_file" ]]; then - bash tests/run.sh "$testcase" - else - echo "All tests passed." - exit - fi + case "$testcase" in + all|run|test_*) + ;; + *) + bash tests/run.sh "$testcase" + ;; + esac done + +echo "All tests passed." -- cgit v1.2.3-70-g09d2