summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2024-08-17 21:30:30 +0100
committerubq323 <ubq323@ubq323.website>2024-08-17 21:30:30 +0100
commitbc68a6aab9de8a90e07e7eb37283cea194dbe0ae (patch)
tree0102b4a5f609d345abfca084df42fc00bdf6c99d
parentfaba0abf74dcdab3a4957bd8f13afa3c4dd19950 (diff)
hide passing tests by default (there are so many)
-rwxr-xr-xrun_tests.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/run_tests.sh b/run_tests.sh
index e852582..2e2de83 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -4,6 +4,13 @@ pass=0
fail=0
skip=0
+show_passes=false
+
+if [ "$1" = "-a" ]; then
+ show_passes=true
+ shift
+fi
+
skipglob="$1"
@@ -29,7 +36,9 @@ for testfile in tests/*.bth; do
echo "$output" | diff "$outfile" - >/dev/null
diff_res=$?
case $diff_res in
- 0) printf '\033[32m\033[1mPASS\033[0m %s\n' "$testname"
+ 0) if $show_passes; then
+ printf '\033[32m\033[1mPASS\033[0m %s\n' "$testname"
+ fi
pass=$((pass + 1)) ;;
1) printf '\033[31m\033[1mFAIL\033[0m %s\n' "$testname"
printf "\tgot output: %s\n" "$(echo "$output" | head -n4)"