diff options
author | bd-912 <bdunahu@colostate.edu> | 2024-03-04 22:53:58 -0700 |
---|---|---|
committer | bd-912 <bdunahu@colostate.edu> | 2024-03-04 22:53:58 -0700 |
commit | 12f1e24766b061e00663e1934b76f64cd79c8fea (patch) | |
tree | 7d7a5343b2a58344770191a954bb2a6e5e05ccc2 /run_tests.sh | |
parent | a23fdfa59b8fa2eaf58fbf6d677caf0b6cdf5a31 (diff) |
Minimal test suite---failing tests
Diffstat (limited to 'run_tests.sh')
-rwxr-xr-x | run_tests.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/run_tests.sh b/run_tests.sh new file mode 100755 index 0000000..4a7c056 --- /dev/null +++ b/run_tests.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +for i in ./tests/*.java; do + [ -f "$i" ] || break + [[ "$i" == *"error"* ]] && expected="Type error" || + expected="Program type checked successfully" + actual=$(java Typecheck < $i) + + echo -n "$(basename ${i}): " + [[ $expected != $actual ]] && echo -e "FAILED---Expected: $expected" || echo 'PASSED' +done + + |