test(trim-paths): match the actual sanitized paths

The old wildcard matched too much and didn't really
show whether the paths were sanitized.
This commit is contained in:
Weihang Lo 2025-05-31 12:03:18 -04:00
parent d8ac8dd2e5
commit 56a1118e52
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7

View File

@ -227,7 +227,7 @@ fn registry_dependency() {
p.cargo("run --verbose -Ztrim-paths")
.masquerade_as_nightly_cargo(&["-Ztrim-paths"])
.with_stdout_data(str![[r#"
[..]/bar-0.0.1/src/lib.rs
-[..]/bar-0.0.1/src/lib.rs
"#]]) // Omit the hash of Source URL
.with_stderr_data(str![[r#"
@ -279,7 +279,7 @@ fn git_dependency() {
p.cargo("run --verbose -Ztrim-paths")
.masquerade_as_nightly_cargo(&["-Ztrim-paths"])
.with_stdout_data(str![[r#"
[..]/[..]/src/lib.rs
bar-[..]/[..]/src/lib.rs
"#]]) // Omit the hash of Source URL and commit
.with_stderr_data(str![[r#"