aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGravatar zinc <zinc@downsta.ir> 2026-10-15 18:32:30 +0330
committerGravatar zinc <zinc@downsta.ir> 2026-10-15 18:32:30 +0330
commit012cbf7146f452690045dd07acd6775dbdf4f76c (patch)
treece863c4f55cf95166357fb8f1e68377016941d56 /tests
parentduplicate case labels are an error (b.2.15); unterminated string literal repo... (diff)
js vm: syscall 7 (exit) stops the run with its status, so a runtime fault no longer runs on past the fault (js vm trace check)
Diffstat (limited to 'tests')
-rwxr-xr-xtests/test.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test.sh b/tests/test.sh
index c31cfb7..45883d0 100755
--- a/tests/test.sh
+++ b/tests/test.sh
@@ -733,6 +733,7 @@ s_js() {
chk "$(node $T/jsvm/tinyvm.js examples/primes.zc | tail -1)" "widest gap: 72, after 31397" "js vm: primes"
chk "$(node $T/jsvm/tinyvm.js tests/programs/growone.zc)" "12 1" "js vm: a block past the initial heap grows the machine"
chk "$(node $T/jsvm/tinyvm.js tests/programs/trace.zc 2>&1 | md5sum)" "$(md5sum < tests/programs/trace.expected)" "js vm: backtraces read the return stack through gate op 56"
+ node $T/jsvm/tinyvm.js tests/programs/trace.zc >/dev/null 2>&1; chk "$?" "2" "js vm: a runtime fault stops the run with exit status 2 (syscall 7), as the native core does"
chk "$(node $T/jsvm/tinyvm.js tests/programs/replace_owner.zc)" "$(cat tests/programs/replace_owner.expected)" "js vm: replacement ownership and cleanup"
chk "$(node $T/jsvm/tinyvm.js tests/programs/embed.zc | tr '\n' '/')" "hello/world 11 42 5 255 8 -1 0 119 15 5 255 3 98 321 63/" "js vm: embed declarations read their files through node"
if sh src/tools/findcc.sh --wasm >/dev/null 2>&1 && command -v wasm-ld >/dev/null; then