diff --git a/.test-framework b/.test-framework index d435022..527a57d 160000 --- a/.test-framework +++ b/.test-framework @@ -1 +1 @@ -Subproject commit d435022a4e579f877408beee52fd42a94735c4a1 +Subproject commit 527a57d07ac44d0d2f602b6f14a7bd3c4bd7fc8d diff --git a/build.sh b/build.sh index b79d7ef..2c040f5 100755 --- a/build.sh +++ b/build.sh @@ -314,6 +314,25 @@ done if "$OPT_VERIFY"; then printc "\n%{YELLOW}Verifying scripts...%{CLEAR}\n" 1>&2 - "${HERE}/test.sh" --compiled - exit $? + + # Run the tests. + FAIL=0 + while read -r action data1 data2 splat; do + [[ "$action" == "result" ]] || continue + + printf "\x1B[G\x1B[K%s" "$data1" 1>&2 + if [[ "$data2" == "fail" ]]; then + printf " failed.\n" 1>&2 + ((FAIL++)) || true + fi + done < <("${HERE}/test.sh" --compiled --porcelain) + + # Print the overall result. + if [[ "$FAIL" -ne 0 ]]; then + printc "%{RED}One or more tests failed.\n" 1>&2 + printc "Run ./test.sh for more detailed information.%{CLEAR}\n" 1>&2 + exit 1 + fi + + printc "\x1B[G\x1B[K%{YELLOW}Verified successfully.%{CLEAR}\n" 1>&2 fi