test(package): relative path to cwd for dirtiness report

This commit is contained in:
Weihang Lo 2024-12-19 20:18:05 -05:00
parent efaaa0ce33
commit 9e2b373acb
No known key found for this signature in database
GPG Key ID: D7DBF189825E82E7

View File

@ -1099,6 +1099,20 @@ Cargo.toml
to proceed despite this and include the uncommitted changes, pass the `--allow-dirty` flag
"#]])
.run();
// cd to `src` and cargo report relative paths.
p.cargo("package")
.cwd(p.root().join("src"))
.with_status(101)
.with_stderr_data(str![[r#"
[ERROR] 1 files in the working directory contain changes that were not yet committed into git:
Cargo.toml
to proceed despite this and include the uncommitted changes, pass the `--allow-dirty` flag
"#]])
.run();
}