Repository navigation
Conversation
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
| } | ||
|
|
||
| #[test] | ||
| fn test_multibyte_char_split_across_read_buffers() { |
There was a problem hiding this comment.
i merged the ignored test too. please merge these
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
|
thanks for the work on this! |
ef8aa61 to
b91bcf0
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
Thanks, done:
|
b91bcf0 to
dc503a3
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
dc503a3 to
555a5c7
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
GNU testsuite comparison: |
|
it has been conflicting for more than 7 days, sorry! please rebase it |
555a5c7 to
3acd8f7
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
3acd8f7 to
88d765f
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
When a read ends inside a UTF-8 character, hold its first bytes back and join them to the next read, so the character is measured once instead of as two invalid bytes of one column each. The check lives in uucore::char_width::incomplete_utf8_suffix so unexpand can share it. Un-ignore test_multibyte_char_split_across_reads and add a portable case where the character straddles the read buffer of a file. Fixes uutils#16503 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
b0bccfd to
7c4c559
Compare
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
Fixes #16503
When a read ended inside a UTF-8 character (a slow pipe, or a file where the character straddles the 8 KiB
BufReaderbuffer),expand_bufsaw the lead byte at the end of one buffer and the continuation byte at the start of the next.char_width_atresyncs each as an invalid byte of width 1, soécounted as two columns and the next tab came out one space short.expand_filenow checks the end of each buffer (in UTF-8 mode only) with a smallincomplete_utf8_suffixhelper: if the last 1-3 bytes begin a sequence that the buffer cuts short, they are held back and joined to the next read. The join only allocates when there is something to carry. If the file ends inside a character, the held bytes are written as before.Tests:
test_multibyte_char_split_across_read_buffers: 8191 ASCII bytes followed byé\tz, soéis split by the read buffer. Onmainthe tab becomes 7 spaces; with the fix it is 8. This is a portable version of thecmd_shell+sleeptest in Add as ignored some failing tests found by oss scanner #16493 and exercises the same path on every platform.test_file_ending_inside_a_multibyte_char: a file ending in a lone\xC3still gets its bytes written unchanged (passes before and after).incomplete_utf8_suffix(complete, cut 2/3/4-byte sequences, a stray continuation byte, a byte that is never a lead byte).cargo test --no-default-features --features expand --test tests -- test_expand::passes (50), as doescargo test -p uu_expand.cargo clippy -p uu_expand --all-targets -- -D warningsand rustfmt are clean.unexpand(#16504) has the same problem; I'll send that separately so each PR stays small.AI disclosure: written with help from Claude Code. Nothing was derived from GNU source.
🤖 Generated with Claude Code