From 9e2b373acb59d3ad3ca7d53c5443fd7f8c079f8a Mon Sep 17 00:00:00 2001 From: Weihang Lo Date: Thu, 19 Dec 2024 20:18:05 -0500 Subject: [PATCH] test(package): relative path to cwd for dirtiness report --- tests/testsuite/package.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/testsuite/package.rs b/tests/testsuite/package.rs index 75d21ffb2..31c834e40 100644 --- a/tests/testsuite/package.rs +++ b/tests/testsuite/package.rs @@ -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(); }