diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/03_bugs/12_altblock_stack_mismatch | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/03_bugs/12_altblock_stack_mismatch b/tests/03_bugs/12_altblock_stack_mismatch index 6805888..e350660 100644 --- a/tests/03_bugs/12_altblock_stack_mismatch +++ b/tests/03_bugs/12_altblock_stack_mismatch @@ -24,3 +24,60 @@ actually executed. print(b, "\n"); %} -- End -- + + +Test a variation of the bug using `for in..endfor` loop syntax. + +-- Expect stdout -- +2 +-- End -- + +-- Testcase -- +{% + for (let x in []): + let a = 1; + endfor; + + let b = 2; + + print(b, "\n"); +%} +-- End -- + + +Test a variation of the bug using `for..endfor` count loop syntax. + +-- Expect stdout -- +2 +-- End -- + +-- Testcase -- +{% + for (let i = 0; i < 0; i++): + let a = 1; + endfor; + + let b = 2; + + print(b, "\n"); +%} +-- End -- + + +Test a variation of the bug using `while..endwhile` loop syntax. + +-- Expect stdout -- +2 +-- End -- + +-- Testcase -- +{% + while (false): + let a = 1; + endwhile; + + let b = 2; + + print(b, "\n"); +%} +-- End -- |