Skip to content

Commit 04f84e4

Browse files
committed
test(msrv): Group bad rust-version tests
1 parent 6f06fe9 commit 04f84e4

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

tests/testsuite/rust_version.rs

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,31 @@ fn rust_version_bad_nonsense() {
157157
.run();
158158
}
159159

160+
#[cargo_test]
161+
fn rust_version_older_than_edition() {
162+
project()
163+
.file(
164+
"Cargo.toml",
165+
r#"
166+
[package]
167+
name = "foo"
168+
version = "0.0.1"
169+
authors = []
170+
rust-version = "1.1"
171+
edition = "2018"
172+
[[bin]]
173+
name = "foo"
174+
"#,
175+
)
176+
.file("src/main.rs", "fn main() {}")
177+
.build()
178+
.cargo("check")
179+
.with_status(101)
180+
.with_stderr_contains(" rust-version 1.1 is older than first version (1.31.0) required by the specified edition (2018)",
181+
)
182+
.run();
183+
}
184+
160185
#[cargo_test]
161186
fn rust_version_too_high() {
162187
let p = project()
@@ -676,28 +701,3 @@ See https://github.com/rust-lang/cargo/issues/9930 for more information about th
676701
)
677702
.run();
678703
}
679-
680-
#[cargo_test]
681-
fn rust_version_older_than_edition() {
682-
project()
683-
.file(
684-
"Cargo.toml",
685-
r#"
686-
[package]
687-
name = "foo"
688-
version = "0.0.1"
689-
authors = []
690-
rust-version = "1.1"
691-
edition = "2018"
692-
[[bin]]
693-
name = "foo"
694-
"#,
695-
)
696-
.file("src/main.rs", "fn main() {}")
697-
.build()
698-
.cargo("check")
699-
.with_status(101)
700-
.with_stderr_contains(" rust-version 1.1 is older than first version (1.31.0) required by the specified edition (2018)",
701-
)
702-
.run();
703-
}

0 commit comments

Comments
 (0)