commit 3e6df9167632c7a43900965b3e2e81b47629bb40 from: Neels Hofmeyr date: Sun Oct 11 05:31:05 2020 UTC run C tests in verify_all.sh commit - 3e66d05b2cdeea5b72b2ee7c116f5dd0cdd1c270 commit + 3e6df9167632c7a43900965b3e2e81b47629bb40 blob - 80da7713de1a9ce2e589b3fc26630156b496d557 blob + 8d5b7c00eaf0e718f501a7eb5125101666163f62 --- test/Makefile +++ test/Makefile @@ -1,7 +1,7 @@ .PHONY: test verify clean test: verify clean -verify: +verify: results_test arraylist_test ./verify_all.sh clean: -rm verify.* blob - ced2e4ff605ec81e767901fde530bc1b5f36cdf4 blob + 48cae69f971a565907eb605d105619ea79357981 --- test/verify_all.sh +++ test/verify_all.sh @@ -77,3 +77,18 @@ for left in test*.left* ; do verify_diff_script "$left" "$right" "$got_diff" "$expected_diff" "$diff_opts" set +e done + +for ctest in *_test.c ; do + prog="$(echo "$ctest" | sed 's/.c//')" + expect_output="expect.${prog}" + prog_output="verify.$expect_output" + set -e + "$prog" > "$prog_output" + set +e + if ! cmp "$prog_output" "$expect_output" ; then + echo "FAIL: $prog_output != $expect_output" + return 1 + else + echo "OK: $prog" + fi +done