From 1010e63cafff8bff18d9d42204fbcbc05bdfe350 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Wed, 26 Apr 2023 11:36:58 +0200 Subject: [PATCH] Add tests for RegExp `v` flag errors that were allowed with `u` https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag Issue: #3496 Issue: https://github.com/tc39/proposal-regexp-v-flag/issues/52 --- .../breaking-change-from-u-to-v-01.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-02.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-03.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-04.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-05.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-06.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-07.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-08.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-09.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-10.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-11.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-12.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-13.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-14.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-15.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-16.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-17.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-18.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-19.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-20.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-21.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-22.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-23.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-24.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-25.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-26.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-27.js | 19 +++++++++++++++++++ .../breaking-change-from-u-to-v-28.js | 19 +++++++++++++++++++ 28 files changed, 532 insertions(+) create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-01.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-02.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-03.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-04.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-05.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-06.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-07.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-08.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-09.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-10.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-11.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-12.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-13.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-14.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-15.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-16.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-17.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-18.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-19.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-20.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-21.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-22.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-23.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-24.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-25.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-26.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-27.js create mode 100644 test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-28.js diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-01.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-01.js new file mode 100644 index 0000000000..056d772473 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-01.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[(]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-02.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-02.js new file mode 100644 index 0000000000..188f074515 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-02.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[)]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-03.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-03.js new file mode 100644 index 0000000000..a0609ca7ba --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-03.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[[]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-04.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-04.js new file mode 100644 index 0000000000..13788ae3e3 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-04.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[{]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-05.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-05.js new file mode 100644 index 0000000000..e71eaa6188 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-05.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[}]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-06.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-06.js new file mode 100644 index 0000000000..a87709359f --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-06.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[/]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-07.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-07.js new file mode 100644 index 0000000000..1c1eb55b4d --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-07.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[-]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-08.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-08.js new file mode 100644 index 0000000000..2713238ae6 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-08.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[|]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-09.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-09.js new file mode 100644 index 0000000000..ac3b30947e --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-09.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[&&]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-10.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-10.js new file mode 100644 index 0000000000..2601ab0c35 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-10.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[!!]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-11.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-11.js new file mode 100644 index 0000000000..e7e9d1934c --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-11.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[##]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-12.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-12.js new file mode 100644 index 0000000000..3a5706e748 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-12.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[$$]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-13.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-13.js new file mode 100644 index 0000000000..0694111a1b --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-13.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[%%]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-14.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-14.js new file mode 100644 index 0000000000..8e2c28a11c --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-14.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[**]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-15.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-15.js new file mode 100644 index 0000000000..9dfa546445 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-15.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[++]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-16.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-16.js new file mode 100644 index 0000000000..8f8e42e769 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-16.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[,,]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-17.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-17.js new file mode 100644 index 0000000000..e3b8baefaa --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-17.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[..]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-18.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-18.js new file mode 100644 index 0000000000..229ac0d71d --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-18.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[::]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-19.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-19.js new file mode 100644 index 0000000000..459b24b566 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-19.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[;;]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-20.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-20.js new file mode 100644 index 0000000000..30256f724c --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-20.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[<<]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-21.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-21.js new file mode 100644 index 0000000000..48c1d9c4d6 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-21.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[==]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-22.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-22.js new file mode 100644 index 0000000000..93e103a242 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-22.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[>>]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-23.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-23.js new file mode 100644 index 0000000000..79ef3b45da --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-23.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[??]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-24.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-24.js new file mode 100644 index 0000000000..018f9bb909 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-24.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[@@]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-25.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-25.js new file mode 100644 index 0000000000..a4d71ca91c --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-25.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[``]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-26.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-26.js new file mode 100644 index 0000000000..c6b159f144 --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-26.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[~~]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-27.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-27.js new file mode 100644 index 0000000000..09f02ac44d --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-27.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[^^^]/v; diff --git a/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-28.js b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-28.js new file mode 100644 index 0000000000..7f84741a6f --- /dev/null +++ b/test/built-ins/RegExp/prototype/unicodeSets/breaking-change-from-u-to-v-28.js @@ -0,0 +1,19 @@ +// Copyright 2023 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +author: Mathias Bynens +description: > + Some previously valid patterns with the `u` flag are now expected to + throw an early SyntaxError with the `v` flag. + https://github.com/tc39/proposal-regexp-v-flag#how-is-the-v-flag-different-from-the-u-flag +esid: sec-parsepattern +negative: + phase: parse + type: SyntaxError +features: [regexp-v-flag] +---*/ + +$DONOTEVALUATE(); + +/[_^^]/v;