test: cover Windows invalid drive paths#66
Merged
Conversation
hyfdev
force-pushed
the
agent/test-windows-invalid-drive
branch
3 times, most recently
from
July 15, 2026 09:16
d46f32d to
5982447
Compare
hyfdev
force-pushed
the
agent/test-windows-invalid-drive
branch
from
July 15, 2026 09:24
5982447 to
1e3835f
Compare
hyfdev
marked this pull request as ready for review
July 15, 2026 09:31
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
Why
The existing Windows invalid-encoding matrix covered unprefixed lexical, absolute, and root-relative paths, but not drive-relative helpers.
Three controlled errors survived the existing suite: comparing drive-relative components through lossy Unicode, refusing to compare any invalid-wide components, and dropping an invalid component while resolving a drive-relative path. The new raw UTF-16 assertions distinguish all three cases through the public APIs.
Validation
rustc --target x86_64-pc-windows-msvc --test ... --emit=metadata -D warningscross-compilation against the built Windows librarycargo fmt --all --checkandgit diff --checkNative Windows execution is provided by the existing GitHub Actions Windows job.