Skip to content

built-ins/RegExp/property-escapes/non-existent-property-value-* tests use invalid quantifiers, not non-existent property values #4555

@auvred

Description

@auvred

And others: https://github.com/search?q=repo%3Atc39%2Ftest262+%22%2F%5C%5C%5C%5Cp%22&type=code

Should be written as /\p{Script_Extensions=H_e_h}/u (with single /). Because /\\p{Script_Extensions=H_e_h}/ is interpreted as backslash \\ followed by p, repeated Script_Extensions=H_e_h times. Therefore, these tests are failing due to an invalid quantifier, not because of a non-existent property value.

It looks like this was missed in mathiasbynens/unicode-property-escapes-tests#9. Before this PR, there were calls like this:

assert.throws.early(SyntaxError, "/\\p{Script_Extensions=H_e_h}/u");

So, my assumption is that these tests were simply converted incorrectly to the new style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions