Repository navigation
fix(csplit): preserve trailing literals and UTF-8 in suffix format - #1895
Merged
caomengxuan666 merged 1 commit intoNov 27, 2026
Merged
Conversation
Member
|
CAPTAIN 定性(CI 重跑后):build-windows (x64 default) 两次重跑均红在同一对测试
结论维持:只读+已跑 CI 面达合入门,待 X299 运行时证据后终裁。 |
Member
|
CAPTAIN-VERIFY(X299 运行时复验):达合入门,队长合入。CI 两轮缺失的 gate 证据已在 X299 补齐:text-fields 分片 csplit 用例 34 例 rc/stdout/产出文件 34/34 与 GNU coreutils 9.4 逐字节一致;PR 专属五种 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
render_validatedliteral accumulation incsplit.rsintoprefix_lit(before%...) andsuffix_lit(after%...), and advance over UTF-8 codepoints instead of casting raw bytes withb[i] as char.csplit -b "%02d.txt"appended.txtto the pre-conversion buffer and producedxx.txt00instead of GNU coreutils 9.4'sxx00.txt, while corrupting non-ASCII UTF-8 suffix characters into Latin-1 mojibake.tr!) are modified.What was removed
outbuffer andb[i] as charbyte widening inrender_validated.Verification
rustfmt --check --edition 2021 rust2/crates/winux-cmds/src/csplit.rs: passedcargo check --workspace --tests --target x86_64-pc-windows-msvc&aarch64-pc-windows-msvc: passedcargo testexecution (suffix_format_preserves_trailing_literals_and_utf8): owed to PR CI