summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/bad_config.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /src/tools/cargo/tests/testsuite/bad_config.rs
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/cargo/tests/testsuite/bad_config.rs')
-rw-r--r--src/tools/cargo/tests/testsuite/bad_config.rs36
1 files changed, 35 insertions, 1 deletions
diff --git a/src/tools/cargo/tests/testsuite/bad_config.rs b/src/tools/cargo/tests/testsuite/bad_config.rs
index 82da880ea..1d3bb9ee1 100644
--- a/src/tools/cargo/tests/testsuite/bad_config.rs
+++ b/src/tools/cargo/tests/testsuite/bad_config.rs
@@ -373,7 +373,7 @@ Caused by:
failed to clone into: [..]
Caused by:
- URLs need to specify the path to the repository
+ URL \"git://host.xz\" does not specify a path to a repository
"
} else {
"\
@@ -1664,3 +1664,37 @@ note: Sources are not allowed to be defined multiple times.
)
.run();
}
+
+#[cargo_test]
+fn bad_trim_paths() {
+ let p = project()
+ .file(
+ "Cargo.toml",
+ r#"
+ [package]
+ name = "foo"
+ version = "0.0.0"
+
+ [profile.dev]
+ trim-paths = "split-debuginfo"
+ "#,
+ )
+ .file("src/lib.rs", "")
+ .build();
+
+ p.cargo("check -Ztrim-paths")
+ .masquerade_as_nightly_cargo(&["trim-paths"])
+ .with_status(101)
+ .with_stderr(
+ r#"error: failed to parse manifest at `[..]`
+
+Caused by:
+ TOML parse error at line 7, column 30
+ |
+ 7 | trim-paths = "split-debuginfo"
+ | ^^^^^^^^^^^^^^^^^
+ expected a boolean, "none", "diagnostics", "macro", "object", "all", or an array with these options
+"#,
+ )
+ .run();
+}