Skip to content

Add a test for "regex"es that use \a (ASCII BEL) #309

Closed
@leadpony

Description

@leadpony

Hello
The 4th and 5th test cases defined in ecmascript-regex.json use the following pattern keyword in the input schema.

"pattern": "^\\a$"

The ECMA-262 specification does not allow a as a letter for control escape in its syntax definition.

ControlEscape :: one of 
  f n r t v

I tested it with Node.js as follows:

node
Welcome to Node.js v12.13.1.
Type ".help" for more information.
> var re = new RegExp('^\\a$');
undefined
> re.test('\u0007');
false

The test case in ecmascript-regex.json seems incompatible with the test() result above.
How should we treat these test cases?

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing testA request to add a test to the suite that is currently not covered elsewhere.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions