test: cover string receiver contracts#64
Merged
Conversation
hyfdev
force-pushed
the
agent/test-string-receiver-contexts
branch
2 times, most recently
from
July 15, 2026 09:06
ba530b9 to
3a9f140
Compare
hyfdev
force-pushed
the
agent/test-string-receiver-contexts
branch
from
July 15, 2026 09:14
3a9f140 to
0e3406e
Compare
hyfdev
marked this pull request as ready for review
July 15, 2026 09:16
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
str/Stringnormalization values andCowvariantsPathreceiver identity contract foras_pathWhy
The existing path semantics were well covered through
Path, but several one-line string receiver forwarding contracts were not crossed with the cases where spelling or cwd state actually changes behavior.Eleven controlled mutations survived the existing full suite, including stripping a clean trailing separator, returning a borrowed result for dirty normalization, bypassing cached cwd, reading cwd for an absolute input, ignoring an explicit relative base, and swallowing strict cwd failures. Each new assertion in this test-only change kills at least one of those mutations.
Validation
cargo test --locked --workspacecargo test --locked --workspace --features cached_current_dircargo test --locked --workspace --all-featurescargo clippy --locked --workspace --all-targets --all-features -- -D warningsas_pathtests