From 9ddb2d3fd79a719ec26b2a9c5a177d02e0600c5e Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Mon, 26 Feb 2018 22:17:12 +0100 Subject: [PATCH] Revert "Revert "Additional tests for QuantifiableAssertion" (#1458)" This reverts commit 173e98e00b14db854d293108d559b79071dfaab2. --- .../regexp/invalid-optional-lookbehind.js | 20 +++++++++++++++++++ .../invalid-optional-negative-lookbehind.js | 20 +++++++++++++++++++ .../regexp/invalid-range-lookbehind.js | 20 +++++++++++++++++++ .../invalid-range-negative-lookbehind.js | 20 +++++++++++++++++++ ...ion.js => u-invalid-optional-lookahead.js} | 0 .../regexp/u-invalid-optional-lookbehind.js | 20 +++++++++++++++++++ .../u-invalid-optional-negative-lookahead.js | 20 +++++++++++++++++++ .../u-invalid-optional-negative-lookbehind.js | 20 +++++++++++++++++++ .../regexp/u-invalid-range-lookahead.js | 20 +++++++++++++++++++ .../regexp/u-invalid-range-lookbehind.js | 20 +++++++++++++++++++ .../u-invalid-range-negative-lookahead.js | 20 +++++++++++++++++++ .../u-invalid-range-negative-lookbehind.js | 20 +++++++++++++++++++ 12 files changed, 220 insertions(+) create mode 100644 test/language/literals/regexp/invalid-optional-lookbehind.js create mode 100644 test/language/literals/regexp/invalid-optional-negative-lookbehind.js create mode 100644 test/language/literals/regexp/invalid-range-lookbehind.js create mode 100644 test/language/literals/regexp/invalid-range-negative-lookbehind.js rename test/language/literals/regexp/{u-invalid-quantifiable-assertion.js => u-invalid-optional-lookahead.js} (100%) create mode 100644 test/language/literals/regexp/u-invalid-optional-lookbehind.js create mode 100644 test/language/literals/regexp/u-invalid-optional-negative-lookahead.js create mode 100644 test/language/literals/regexp/u-invalid-optional-negative-lookbehind.js create mode 100644 test/language/literals/regexp/u-invalid-range-lookahead.js create mode 100644 test/language/literals/regexp/u-invalid-range-lookbehind.js create mode 100644 test/language/literals/regexp/u-invalid-range-negative-lookahead.js create mode 100644 test/language/literals/regexp/u-invalid-range-negative-lookbehind.js diff --git a/test/language/literals/regexp/invalid-optional-lookbehind.js b/test/language/literals/regexp/invalid-optional-lookbehind.js new file mode 100644 index 00000000000..0e46d6b2517 --- /dev/null +++ b/test/language/literals/regexp/invalid-optional-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."; + +/.(?<=.)?/; 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 00000000000..b972bc6764f --- /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."; + +/.(?