From 4c6668f2b6a3714fb5d6c4262b0a4f2645c745cc Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Tue, 1 Oct 2024 18:21:10 -0400 Subject: [PATCH] make test script look nicer on failure --- tools/test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/test.sh b/tools/test.sh index 2dcbf6a..b6c94ac 100755 --- a/tools/test.sh +++ b/tools/test.sh @@ -35,7 +35,10 @@ if [ $res = 0 ]; then printf "\033[32mPASSED\033[0m\n" else printf "\033[31mFAILED\033[0m\n" - diff <(echo $out) <(echo $rout) + if [ "$status" != "$rstatus" ]; then + printf "exit: $rstatus (should be $status)\n" + fi + diff -Nau <(printf "%s\n" "$out") <(printf "%s\n" "$rout") fi exit $res