-
-
Notifications
You must be signed in to change notification settings - Fork 215
Add a test for "regex"es that use \a (ASCII BEL) #309
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
Comments
Seems you're right to me from what I can tell. @Zac-HD might be able to weigh in having presumably just read through that spec, but assuming you're right here, probably worth changing that one to use one of the other escape characters, and then explicitly adding one saying \a isn't valid. |
I would like to hear the initial intention of the test from @Zac-HD if possible. |
We should switch as @Julian suggests; I was just more familiar with the Python than the ECMA string escapes. |
@Julian @Zac-HD There exist 2 regular expression patterns defined in the ECMA-262 specification. Note that the latter pattern is a part of B. Additional ECMAScript Features for Web Browsers. Both patterns do not allow
The JSON Schema Specification does not state which pattern should be followed, therefore we cannot make the test without some ambiguity. |
Thanks for doing the research. Seems like probably something to raise upstream on the spec if there's missing clarity then yeah. |
(At which point we can probably just decouple the two of these things -- immediately change the Sound reasonable? |
At least this fixes the wrong test case reported in issue json-schema-org#309
Filed json-schema-org/json-schema-spec#821 -- we can leave this ticket open until the upstream issue is clarified, and then add a test for the decided upon behavior. |
Upd: ah, ignore me, I misread, that's in |
For more complete coverage, you could test |
Hello
The 4th and 5th test cases defined in
ecmascript-regex.json
use the followingpattern
keyword in the input schema.The ECMA-262 specification does not allow
a
as a letter for control escape in its syntax definition.I tested it with Node.js as follows:
The test case in
ecmascript-regex.json
seems incompatible with thetest()
result above.How should we treat these test cases?
The text was updated successfully, but these errors were encountered: