diff options
author | Jo-Philipp Wich <jo@mein.io> | 2020-10-18 18:06:54 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2020-10-18 18:09:21 +0200 |
commit | 898a28de86600b62ddd5f971b910eaadc222bbb7 (patch) | |
tree | 7d4e18f136e50517f154c372f057937f1992ee77 /tests/02_runtime | |
parent | d815d0e0ee00de41e792246ba1baddf1d68b0f59 (diff) |
ast, eval: add recursion limit
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'tests/02_runtime')
-rw-r--r-- | tests/02_runtime/06_recursion | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/02_runtime/06_recursion b/tests/02_runtime/06_recursion index e707c86..028feba 100644 --- a/tests/02_runtime/06_recursion +++ b/tests/02_runtime/06_recursion @@ -33,3 +33,28 @@ Testing recursive invocations. test(1); %} -- End -- + + +2. Testing infinite recursion. + +-- Expect stderr -- +Runtime error: Too much recursion +In test(), line 3, byte 7: + at function test ([stdin]:3:7) + at main function ([stdin]:6:6) + + ` test();` + Near here --^ + + +-- End -- + +-- Testcase -- +{% + function test() { + test(); + } + + test(); +%} +-- End -- |