diff options
Diffstat (limited to 'test')
12 files changed, 220 insertions, 0 deletions
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 000000000..0e46d6b25 --- /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 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."; + +/.(?<!.)?/; 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 000000000..2019433e8 --- /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 000000000..c02122bbb --- /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 index c1d64c2c7..c1d64c2c7 100644 --- a/test/language/literals/regexp/u-invalid-quantifiable-assertion.js +++ b/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 000000000..d36b4e0c9 --- /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 000000000..e12dcae6e --- /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 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; 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 000000000..1c6efb12c --- /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 000000000..a69084869 --- /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 000000000..18d3c1b12 --- /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 000000000..7bb80a249 --- /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; |