Skip to content

Optional test for ECMA 262 regular expressions? #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Relequestual opened this issue Aug 14, 2018 · 4 comments
Closed

Optional test for ECMA 262 regular expressions? #235

Relequestual opened this issue Aug 14, 2018 · 4 comments

Comments

@Relequestual
Copy link
Member

pattern

The value of this keyword MUST be a string. This string SHOULD be a valid regular expression, according to the ECMA 262 regular expression dialect.

I've seen one or two implementations load in specific regex implementations which differs from the standard provided by the language of choice. We could add an optional test to run some basic checks on conformance to the SHOULD here.

I don't know the major differences between regex dialects, so I can't advise without research time I cannot commit right now.

Just a thought.

@Julian
Copy link
Member

Julian commented Aug 14, 2018

@Relequestual
Copy link
Member Author

I am bad. I Should have checked first.
Is there anything it supports which others will not? Or is that the best test we are going to get?

@johandorland
Copy link
Contributor

https://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines has a quite comprehensive list of things that various implementations do and do not support. There is currently one test that tries to differentiate from .NET, but if you add a few tests to make sure lookaheads and backreferences are supported, but not lookbehinds I think you have a fairly robust test suite.

@Relequestual
Copy link
Member Author

OK. Let's close this as it feels already covered.
Thanks for looking into this @johandorland and thanks @Julian for the ongoing test suite work =]

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

No branches or pull requests

3 participants