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 0000000000000000000000000000000000000000..0e46d6b2517d9d94b7a8ce88f398d17d87cfe4f3 --- /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 0000000000000000000000000000000000000000..b972bc6764f91be978b909650bc7d2909d5ab3cd --- /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."; + +/.(?<!.)?/; diff --git a/test/language/literals/regexp/invalid-range-lookbehind.js b/test/language/literals/regexp/invalid-range-lookbehind.js new file mode 100644 index 0000000000000000000000000000000000000000..2019433e8270dabbbb2714aa40cb02a0e47cbce8 --- /dev/null +++ b/test/language/literals/regexp/invalid-range-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."; + +/.(?<=.){2,3}/; diff --git a/test/language/literals/regexp/invalid-range-negative-lookbehind.js b/test/language/literals/regexp/invalid-range-negative-lookbehind.js new file mode 100644 index 0000000000000000000000000000000000000000..c02122bbb1154b416900d7b1f1eb8aa012dadbe6 --- /dev/null +++ b/test/language/literals/regexp/invalid-range-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."; + +/.(?<!.){2,3}/; diff --git a/test/language/literals/regexp/u-invalid-quantifiable-assertion.js b/test/language/literals/regexp/u-invalid-optional-lookahead.js similarity index 100% rename from test/language/literals/regexp/u-invalid-quantifiable-assertion.js rename to test/language/literals/regexp/u-invalid-optional-lookahead.js diff --git a/test/language/literals/regexp/u-invalid-optional-lookbehind.js b/test/language/literals/regexp/u-invalid-optional-lookbehind.js new file mode 100644 index 0000000000000000000000000000000000000000..d36b4e0c9d727e531c7d7a6630b6c0d1ff50336e --- /dev/null +++ b/test/language/literals/regexp/u-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."; + +/.(?<=.)?/u; diff --git a/test/language/literals/regexp/u-invalid-optional-negative-lookahead.js b/test/language/literals/regexp/u-invalid-optional-negative-lookahead.js new file mode 100644 index 0000000000000000000000000000000000000000..e12dcae6e6bd257d177fac2bc57f69d23080ac6b --- /dev/null +++ b/test/language/literals/regexp/u-invalid-optional-negative-lookahead.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +/.(?!.)?/u; 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 0000000000000000000000000000000000000000..6697fa05fa6e1c92e037bfa8ea00df140b5e84ed --- /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; diff --git a/test/language/literals/regexp/u-invalid-range-lookahead.js b/test/language/literals/regexp/u-invalid-range-lookahead.js new file mode 100644 index 0000000000000000000000000000000000000000..1c6efb12c76105e02f40bff5843ffc4daac0f3e3 --- /dev/null +++ b/test/language/literals/regexp/u-invalid-range-lookahead.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +/.(?=.){2,3}/u; diff --git a/test/language/literals/regexp/u-invalid-range-lookbehind.js b/test/language/literals/regexp/u-invalid-range-lookbehind.js new file mode 100644 index 0000000000000000000000000000000000000000..a6908486981f5ab66187722598e4fb6a8e0044f8 --- /dev/null +++ b/test/language/literals/regexp/u-invalid-range-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."; + +/.(?<=.){2,3}/u; diff --git a/test/language/literals/regexp/u-invalid-range-negative-lookahead.js b/test/language/literals/regexp/u-invalid-range-negative-lookahead.js new file mode 100644 index 0000000000000000000000000000000000000000..18d3c1b126c534b9143fd207dc0f57eb36b09f0d --- /dev/null +++ b/test/language/literals/regexp/u-invalid-range-negative-lookahead.js @@ -0,0 +1,20 @@ +// Copyright (C) 2016 the V8 project authors. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +esid: sec-regular-expressions-patterns +es6id: B.1.4 +description: Quantifiable assertions disallowed with `u` flag +info: | + The `u` flag precludes quantifiable assertions (even when Annex B is + honored) + + Term[U] :: + [~U] QuantifiableAssertion Quantifier +negative: + phase: parse + type: SyntaxError +---*/ + +throw "Test262: This statement should not be evaluated."; + +/.(?!.){2,3}/u; diff --git a/test/language/literals/regexp/u-invalid-range-negative-lookbehind.js b/test/language/literals/regexp/u-invalid-range-negative-lookbehind.js new file mode 100644 index 0000000000000000000000000000000000000000..7bb80a24990f1f11939ec72b1c65924c4780def2 --- /dev/null +++ b/test/language/literals/regexp/u-invalid-range-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."; + +/.(?<!.){2,3}/u;