Skip to content

uucore: fix test_crlf_across_blocks not compiling on Windows - #14254

Open
abhijeetvichare76 wants to merge 1 commit into
uutils:mainfrom
abhijeetvichare76:uucore-sum-windows-test
Open

uucore: fix test_crlf_across_blocks not compiling on Windows#14254
abhijeetvichare76 wants to merge 1 commit into
uutils:mainfrom
abhijeetvichare76:uucore-sum-windows-test

Conversation

@abhijeetvichare76

Copy link
Copy Markdown

cargo test -p uucore does not compile on Windows:

error[E0369]: binary operation `==` cannot be applied to type `Result<DigestOutput, std::io::Error>`
   --> src/uucore/src/lib/features/sum.rs:748:9

result() became fallible in 0d335eb, but this #[cfg(windows)] test still compares the io::Result values directly. CI only builds uucore's lib tests on Linux, so it went unnoticed. Unwrapping both makes the test compile and pass.

Note: with this applied, features::time::tests::test_large_system_time{,_float} then fail on Windows (UNIX_EPOCH + 67768036191763200s overflows a FILETIME). That looks like a separate question about how those tests should behave on Windows, so I left it out of this change.

result() became fallible in 0d335eb, but this Windows-only test still
compared the io::Result values directly, and io::Error is not PartialEq.
Unwrap both before comparing.
@xtqqczze

Copy link
Copy Markdown
Contributor

still draft?

@abhijeetvichare76
abhijeetvichare76 marked this pull request as ready for review August 30, 2026 00:59
@abhijeetvichare76

Copy link
Copy Markdown
Author

@xtqqczze just published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants