From eecee31d05bb62f1a83f90d3aa7592ff1f66342f Mon Sep 17 00:00:00 2001 From: Leo Balter Date: Wed, 14 Jul 2021 13:52:33 -0700 Subject: [PATCH] Add initial tests for WS positioned after RegExp literal --- src/regexp-insignificant-ws/000A-escaped.case | 11 +++++++++++ src/regexp-insignificant-ws/000D-escaped.case | 11 +++++++++++ .../default/after.template | 16 ++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 src/regexp-insignificant-ws/000A-escaped.case create mode 100644 src/regexp-insignificant-ws/000D-escaped.case create mode 100644 src/regexp-insignificant-ws/default/after.template diff --git a/src/regexp-insignificant-ws/000A-escaped.case b/src/regexp-insignificant-ws/000A-escaped.case new file mode 100644 index 0000000000..c2654acb23 --- /dev/null +++ b/src/regexp-insignificant-ws/000A-escaped.case @@ -0,0 +1,11 @@ +// Copyright (C) 2021 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: 000A (LF) +esid: prod-RegularExpressionLiteral +template: default +---*/ + +//- character +\u000A diff --git a/src/regexp-insignificant-ws/000D-escaped.case b/src/regexp-insignificant-ws/000D-escaped.case new file mode 100644 index 0000000000..881ed6b86f --- /dev/null +++ b/src/regexp-insignificant-ws/000D-escaped.case @@ -0,0 +1,11 @@ +// Copyright (C) 2021 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +desc: 000D (RF) +esid: prod-RegularExpressionLiteral +template: default +---*/ + +//- character +\u000D diff --git a/src/regexp-insignificant-ws/default/after.template b/src/regexp-insignificant-ws/default/after.template new file mode 100644 index 0000000000..80b7963083 --- /dev/null +++ b/src/regexp-insignificant-ws/default/after.template @@ -0,0 +1,16 @@ +// Copyright (C) 2021 Leo Balter. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +path: language/literals/regexp/ +name: WhiteSpace character positioned after +esid: prod-RegularExpressionLiteral +info: | + In the ECMAScript lexical grammar, WhiteSpace is defined to include ASCII + tab/vertical tab/form feed/space, nonbreaking space, BOM/zero-width + nonbreaking space, and any code point with the Unicode property + “Space_Separator”, and LineTerminator is any of U+000A LINE FEED, U+000D + CARRIAGE RETURN, U+2028 LINE SEPARATOR, and U+2029 PARAGRAPH SEPARATOR. Both + are required to be insignificant in between expression tokens +---*/ + +/.//*{ character }*/;