diff options
-rwxr-xr-x | run_tests.sh | 2 | ||||
-rw-r--r-- | tests/00_syntax/16_for_loop | 16 | ||||
-rw-r--r-- | tests/02_runtime/00_scoping | 12 |
3 files changed, 15 insertions, 15 deletions
diff --git a/run_tests.sh b/run_tests.sh index 78b93c1..a22ecec 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -47,7 +47,7 @@ run_testcase() { local code=$6 local fail=0 - ./utpl -i - <"$in" >"$dir/res.out" 2>"$dir/res.err" + ./ucode -i - <"$in" >"$dir/res.out" 2>"$dir/res.err" printf "%d\n" $? > "$dir/res.code" diff --git a/tests/00_syntax/16_for_loop b/tests/00_syntax/16_for_loop index 090f87b..33d1d97 100644 --- a/tests/00_syntax/16_for_loop +++ b/tests/00_syntax/16_for_loop @@ -219,10 +219,10 @@ rejected. -- Expect stderr -- Syntax error: Invalid for-in expression -In line 2, byte 16: +In line 2, byte 14: ` for (let x, y, z in {})` - Near here --------^ + Near here ------^ -- End -- @@ -239,10 +239,10 @@ Ensure that assignments in for-in loop expressions are rejected. -- Expect stderr -- Syntax error: Invalid for-in expression -In line 2, byte 15: +In line 2, byte 13: ` for (let x = 1, y in {})` - Near here -------^ + Near here -----^ -- End -- @@ -260,10 +260,10 @@ Ensure that too short for-in loop expressions are rejected (1/2). -- Expect stderr -- Syntax error: Unexpected token Expecting ',' or 'in' -In line 2, byte 14: +In line 2, byte 12: ` for (let x)` - Near here ------^ + Near here ----^ -- End -- @@ -280,10 +280,10 @@ Ensure that too short for-in loop expressions are rejected (2/2). -- Expect stderr -- Syntax error: Invalid for-in expression -In line 2, byte 16: +In line 2, byte 14: ` for (let x, y)` - Near here --------^ + Near here ------^ -- End -- diff --git a/tests/02_runtime/00_scoping b/tests/02_runtime/00_scoping index 0ac399b..2bca2ab 100644 --- a/tests/02_runtime/00_scoping +++ b/tests/02_runtime/00_scoping @@ -46,15 +46,15 @@ outer f_e=3 -- Testcase -- {% a_global = true; - let a_let = true; + let a_local = true; function test() { b_global = true; - let b_let = true; + let b_local = true; function test2() { c_global = true; - let c_let = true; + let c_local = true; } test2(); @@ -64,13 +64,13 @@ outer f_e=3 -%} a_global={{ !!a_global }} -a_local={{ !!a_let }} +a_local={{ !!a_local }} b_global={{ !!b_global }} -b_local={{ !!b_let }} +b_local={{ !!b_local }} c_global={{ !!c_global }} -c_local={{ !!c_let }} +c_local={{ !!c_local }} When seting a nonlet variable, it is set in the nearest parent |