diff options
author | Daniel Ehrenberg <littledan@chromium.org> | 2018-02-26 12:26:38 +0100 |
---|---|---|
committer | Daniel Ehrenberg <littledan@chromium.org> | 2018-02-26 12:34:39 +0100 |
commit | f9a0f05850f2d8a3f5778282f71962285235d3d4 (patch) | |
tree | 3225499aa1a87731464627dced047ad0c195790a /test/language/literals/regexp/invalid-optional-negative-lookbehind.js | |
parent | b59d956b3c268abd0875aeb87d6688f4c7aafc9b (diff) | |
download | qtdeclarative-testsuites-f9a0f05850f2d8a3f5778282f71962285235d3d4.tar.gz |
Additional tests for QuantifiableAssertion
- Tests that lookahead and lookbehind are not extended to
QuantifiableAssertion, as in https://github.com/tc39/ecma262/pull/1102
- Additional tests verifying some more combinations of cases for
QuantifiableAssertion being invalid in Unicode mode.
Based on the tests in https://chromium-review.googlesource.com/c/v8/v8/+/926102
These tests pass on V8 (if the throw for early errors is removed to
work around a V8 issue where RegExps don't have early errors).
Diffstat (limited to 'test/language/literals/regexp/invalid-optional-negative-lookbehind.js')
-rw-r--r-- | test/language/literals/regexp/invalid-optional-negative-lookbehind.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/language/literals/regexp/invalid-optional-negative-lookbehind.js b/test/language/literals/regexp/invalid-optional-negative-lookbehind.js new file mode 100644 index 000000000..b972bc676 --- /dev/null +++ b/test/language/literals/regexp/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."; + +/.(?<!.)?/; |