diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/custom/00_syntax/21_regex_literals | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/custom/00_syntax/21_regex_literals b/tests/custom/00_syntax/21_regex_literals index 6d85e97..d7ba7c4 100644 --- a/tests/custom/00_syntax/21_regex_literals +++ b/tests/custom/00_syntax/21_regex_literals @@ -73,17 +73,23 @@ In line 2, byte 2: Testing regex compilation errors. -- Expect stderr -- -Syntax error: Unmatched \{ -In line 2, byte 3: +Catched syntax error +In line 7, byte 30: - ` /foo {/` - ^-- Near here + ` die("Catched syntax error");` + Near here ----------------------------^ -- End -- -- Testcase -- {% - /foo {/ + try { + /foo (/ + } + catch (e) { + if (e.type == "Syntax error") + die("Catched syntax error"); + } %} -- End -- |