Skip to content

Add tests for \p{…} with properties of strings#3360

Merged
rwaldron merged 1 commit into
tc39:mainfrom
mathiasbynens:properties-of-strings
Jan 4, 2022
Merged

Add tests for \p{…} with properties of strings#3360
rwaldron merged 1 commit into
tc39:mainfrom
mathiasbynens:properties-of-strings

Conversation

@mathiasbynens

@mathiasbynens mathiasbynens commented Dec 27, 2021

Copy link
Copy Markdown
Member

This functionality is part of the RegExp v flag proposal: https://github.com/tc39/proposal-regexp-set-notation This patch adds exhaustive tests that verifies every supported property of strings matches every single string it needs to. The tests also include some similar-looking-but-different strings and ensure those aren’t matched.

The code that generated the tests is here: mathiasbynens/unicode-property-escapes-tests#10 However, please review this PR containing only the generated output, and let me know what needs changing. I’ll happily update the test generator accordingly.

Note: This proposal is not yet at Stage 3, so you may want to hold off on merging the PR. However, I’d like to get your reviews already so that I can address any feedback in the test generator.

Comment thread harness/regExpUtils.js

@rwaldron rwaldron left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for covering all of the admin parts on this!

@rwaldron rwaldron merged commit 489a9f8 into tc39:main Jan 4, 2022
@mathiasbynens mathiasbynens deleted the properties-of-strings branch January 4, 2022 14:45
@FrankYFTang

Copy link
Copy Markdown
Contributor

Note: This proposal is not yet at Stage 3, so you may want to hold off on merging the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants