From 3415badef847db518daa9b46c6274ac3fb89f56d Mon Sep 17 00:00:00 2001 From: bd-912 Date: Mon, 15 Apr 2024 22:30:43 -0600 Subject: HW3 Test runner script --- boil.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 boil.sh (limited to 'boil.sh') diff --git a/boil.sh b/boil.sh new file mode 100644 index 0000000..3eade60 --- /dev/null +++ b/boil.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +for i in ./boil/tests/*.java; do + [ -f "$i" ] || break + n=${i%.java} + javac -g $i + + expected=$(java -cp ./boil/tests/ ${n##*/}) + + java J2V < $i > test.vapor + actual=$(java -jar vapor.jar run test.vapor) + + echo -n "$(basename ${i}): " + [[ $expected == $actual ]] && echo 'PASSED' || echo -e "FAILED" +done + +rm test.vapor -- cgit v1.2.3