-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
uucore/quoting_style: Add support for quoting/escaping empty strings #7693
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
Conversation
GNU testsuite comparison:
|
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.
Thanks !
Can you also add a test in test_printf.rs
as well ?
} else if name.is_empty() { | ||
(Quotes::Single, true) |
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.
Please account for the clippy warning and merge the if case with the one above.
2017735
to
12fb470
Compare
Made the clippy change, The test failure appears to be from parts of the tests setting From the output in GitHub Action logs, it looks like we have the correct behavior for |
GNU testsuite comparison:
|
Our implementation does not handle locale setting at all for the moment. This will change in the future, but in the mean time, the implementation should stick to the The GNU tests that rely on locale-setting are expected to fail until then. |
12fb470
to
4756866
Compare
GNU testsuite comparison:
|
Gotcha, thank you. So this test doesn't pass tests/printf/printf-quote (unless one does not have the French locale installed), but at least it fixes |
4756866
to
9d7991e
Compare
GNU testsuite comparison:
|
9d7991e
to
b88afd4
Compare
GNU testsuite comparison:
|
b88afd4
to
3cdc248
Compare
GNU testsuite comparison:
|
3cdc248
to
9f1e7a2
Compare
GNU testsuite comparison:
|
I've rebased this PR; it does fix tests/printf/printf-quote except for locale-specific logic, I wasn't intending to add more to this PR unless there's other code review comments |
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.
LGTM
This PR adds the ability to determine quotations and/or escaping needed for empty strings. This can happen if an empty string is passed to
printf
.