make test script look nicer on failure

This commit is contained in:
Murphy 2024-10-01 18:21:10 -04:00
parent 12e098b682
commit 4c6668f2b6
Signed by: freya
GPG key ID: 744AB800E383AE52

View file

@ -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