mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
8 years ago
1 changed files with 25 additions and 0 deletions
@ -0,0 +1,25 @@ |
|||||
|
/* |
||||
|
* This test from https://github.com/kangax/compat-table succeeds but
|
||||
|
* should fail. |
||||
|
*/ |
||||
|
|
||||
|
/*=== |
||||
|
SyntaxError |
||||
|
SyntaxError |
||||
|
===*/ |
||||
|
|
||||
|
try { |
||||
|
var t = eval('/(?P<name>a)(?P=name)/'); |
||||
|
print(t); |
||||
|
print(t.test("aa")); |
||||
|
} catch (e) { |
||||
|
print(e.name); |
||||
|
} |
||||
|
|
||||
|
try { |
||||
|
// In General '(?' followed by something else than ':' is a SyntaxError.
|
||||
|
var t = eval('/(?X)/'); |
||||
|
print(t); |
||||
|
} catch (e) { |
||||
|
print(e.name); |
||||
|
} |
Loading…
Reference in new issue