summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/build.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /src/tools/cargo/tests/testsuite/build.rs
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/cargo/tests/testsuite/build.rs')
-rw-r--r--src/tools/cargo/tests/testsuite/build.rs37
1 files changed, 27 insertions, 10 deletions
diff --git a/src/tools/cargo/tests/testsuite/build.rs b/src/tools/cargo/tests/testsuite/build.rs
index 8cb064a6f..1afa83918 100644
--- a/src/tools/cargo/tests/testsuite/build.rs
+++ b/src/tools/cargo/tests/testsuite/build.rs
@@ -136,6 +136,29 @@ fn incremental_config() {
}
#[cargo_test]
+fn cargo_compile_with_redundant_default_mode() {
+ let p = project()
+ .file("Cargo.toml", &basic_bin_manifest("foo"))
+ .file("src/foo.rs", &main_file(r#""i am foo""#, &[]))
+ .build();
+
+ p.cargo("build --debug")
+ .with_stderr(
+ "\
+error: unexpected argument '--debug' found
+
+ tip: `--debug` is the default for `cargo build`; instead `--release` is supported
+
+Usage: cargo[EXE] build [OPTIONS]
+
+For more information, try '--help'.
+",
+ )
+ .with_status(1)
+ .run();
+}
+
+#[cargo_test]
fn cargo_compile_with_workspace_excluded() {
let p = project().file("src/main.rs", "fn main() {}").build();
@@ -259,9 +282,6 @@ fn cargo_compile_with_invalid_manifest2() {
[ERROR] failed to parse manifest at `[..]`
Caused by:
- could not parse input as TOML
-
-Caused by:
TOML parse error at line 3, column 23
|
3 | foo = bar
@@ -284,9 +304,6 @@ fn cargo_compile_with_invalid_manifest3() {
[ERROR] failed to parse manifest at `[..]`
Caused by:
- could not parse input as TOML
-
-Caused by:
TOML parse error at line 1, column 5
|
1 | a = bar
@@ -346,8 +363,11 @@ fn cargo_compile_with_invalid_version() {
[ERROR] failed to parse manifest at `[..]`
Caused by:
+ TOML parse error at line 4, column 19
+ |
+ 4 | version = \"1.0\"
+ | ^^^^^
unexpected end of input while parsing minor version number
- in `package.version`
",
)
.run();
@@ -3036,9 +3056,6 @@ Caused by:
could not parse TOML configuration in `[..]`
Caused by:
- could not parse input as TOML
-
-Caused by:
TOML parse error at line 1, column 6
|
1 | this is not valid toml