-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
fix: tap parser fails when test name includes non ASCII characters #45741
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test to validate this indeed fixes the bug?
@@ -482,6 +483,11 @@ class TapLexer { | |||
return '!"$%&\'()*,./:;<=>?@[]^_`{|}~'.indexOf(char) > -1; | |||
} | |||
|
|||
#isNonASCIISymbol(char) { | |||
const ascii = /^[ -~]+$/; | |||
return !ascii.test(char); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return !ascii.test(char); | |
return RegExpPrototypeExec(ascii, char) === null; |
Sure, Where should I add test ? |
|
@pulkit-30 FYI there is already an open PR fixing this issue #45736 |
ohh! I didn't notice that, should I close this PR? |
preferably, I see you found another
good first issue
|
fixes: #45706
fix: tap parser fails when test name includes non ASCII characters
check for non-ascii characters and return
true
if it is not.function to check for non-ASCII characters:
Example:
Testing:
Output: