summaryrefslogtreecommitdiff
path: root/test/language/literals/regexp/u-invalid-optional-negative-lookbehind.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/language/literals/regexp/u-invalid-optional-negative-lookbehind.js')
-rw-r--r--test/language/literals/regexp/u-invalid-optional-negative-lookbehind.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/language/literals/regexp/u-invalid-optional-negative-lookbehind.js b/test/language/literals/regexp/u-invalid-optional-negative-lookbehind.js
new file mode 100644
index 000000000..6697fa05f
--- /dev/null
+++ b/test/language/literals/regexp/u-invalid-optional-negative-lookbehind.js
@@ -0,0 +1,20 @@
+// Copyright (C) 2018 Igalia S. L. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-regular-expressions-patterns
+description: Lookbehinds are not treated as a QuantifiableAssertion
+info: |
+ Term[U] ::
+ [~U] QuantifiableAssertion Quantifier
+
+ QuantifiableAssertion[N]::
+ ( ? = Disjunction[~U, ?N] )
+ ( ? ! Disjunction[~U, ?N] )
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+throw "Test262: This statement should not be evaluated.";
+
+/.(?<!.)?/u;