aboutsummaryrefslogtreecommitdiff
path: root/tests/test.sh
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-14 19:55:03 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-14 19:55:03 +0330
commit35d1811c7ef8e41baddb9ce0fbb1d28970ddc213 (patch)
tree387fbb068b0e47129e6faea30c7d0b5451921ca8 /tests/test.sh
parentmerge work/exactsize: exact-size heap bounds (diff)
zy: nonzero exit on compile errors
Diffstat (limited to 'tests/test.sh')
-rwxr-xr-xtests/test.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test.sh b/tests/test.sh
index 78b1f77..39e5949 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -237,6 +237,8 @@ ABC" "$l o3 lifts byte loads and stores"
chk "$r" "rejected: $(ls tests/typeerrors/*.zc | wc -l | tr -d ' ') passed, 0 failed" "$l typechecker rejects every bad program"
r=$(bash tests/runerr.sh "$vm" tests/langerrors | tail -1)
chk "$r" "rejected: $(ls tests/langerrors/*.zc | wc -l | tr -d ' ') passed, 0 failed" "$l o3 and array misuse is rejected"
+ bash tests/exitstatus.sh "$vm" > /tmp/zy-exitstatus.$$ 2>&1; r=$?; grep -v '^ok' /tmp/zy-exitstatus.$$; rm -f /tmp/zy-exitstatus.$$
+ chk $r 0 "$l a compile error exits 1, a good program and a runtime trap exit 0"
}
s_interp() {
T=$ROOT/interp