summaryrefslogtreecommitdiffstats
path: root/src/tools/cargo/tests/testsuite/features.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/cargo/tests/testsuite/features.rs')
-rw-r--r--src/tools/cargo/tests/testsuite/features.rs37
1 files changed, 30 insertions, 7 deletions
diff --git a/src/tools/cargo/tests/testsuite/features.rs b/src/tools/cargo/tests/testsuite/features.rs
index 4b7455c37..febdf52fe 100644
--- a/src/tools/cargo/tests/testsuite/features.rs
+++ b/src/tools/cargo/tests/testsuite/features.rs
@@ -60,6 +60,10 @@ fn empty_feature_name() {
[ERROR] failed to parse manifest at `[..]`
Caused by:
+ TOML parse error at line 8, column 17
+ |
+ 8 | \"\" = []
+ | ^^
feature name cannot be empty
",
)
@@ -627,7 +631,14 @@ fn cyclic_feature2() {
.file("src/main.rs", "fn main() {}")
.build();
- p.cargo("check").with_stdout("").run();
+ p.cargo("check")
+ .with_stderr(
+ "\
+[CHECKING] foo [..]
+[FINISHED] [..]
+",
+ )
+ .run();
}
#[cargo_test]
@@ -1047,8 +1058,8 @@ fn no_rebuild_when_frobbing_default_feature() {
.build();
p.cargo("check").run();
- p.cargo("check").with_stdout("").run();
- p.cargo("check").with_stdout("").run();
+ p.cargo("check").with_stderr("[FINISHED] [..]").run();
+ p.cargo("check").with_stderr("[FINISHED] [..]").run();
}
#[cargo_test]
@@ -1098,8 +1109,8 @@ fn unions_work_with_no_default_features() {
.build();
p.cargo("check").run();
- p.cargo("check").with_stdout("").run();
- p.cargo("check").with_stdout("").run();
+ p.cargo("check").with_stderr("[FINISHED] [..]").run();
+ p.cargo("check").with_stderr("[FINISHED] [..]").run();
}
#[cargo_test]
@@ -2048,7 +2059,11 @@ fn invalid_feature_names_error() {
error: failed to parse manifest at `[ROOT]/foo/Cargo.toml`
Caused by:
- invalid character `+` in feature `+foo` in package foo v0.1.0 ([ROOT]/foo), \
+ TOML parse error at line 8, column 17
+ |
+ 8 | \"+foo\" = []
+ | ^^^^^^
+ invalid character `+` in feature `+foo`, \
the first character must be a Unicode XID start character or digit \
(most letters or `_` or `0` to `9`)
",
@@ -2075,7 +2090,11 @@ Caused by:
error: failed to parse manifest at `[ROOT]/foo/Cargo.toml`
Caused by:
- invalid character `&` in feature `a&b` in package foo v0.1.0 ([ROOT]/foo), \
+ TOML parse error at line 8, column 13
+ |
+ 8 | \"a&b\" = []
+ | ^^^^^
+ invalid character `&` in feature `a&b`, \
characters must be Unicode XID characters, '-', `+`, or `.` \
(numbers, `+`, `-`, `_`, `.`, or most letters)
",
@@ -2108,6 +2127,10 @@ fn invalid_feature_name_slash_error() {
error: failed to parse manifest at `[CWD]/Cargo.toml`
Caused by:
+ TOML parse error at line 7, column 17
+ |
+ 7 | \"foo/bar\" = []
+ | ^^^^^^^^^
feature named `foo/bar` is not allowed to contain slashes
",
)