Skip to content

Commit ccedb8f

Browse files
committed
test(manifest): Verify error on good pre-release
1 parent a2830db commit ccedb8f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

tests/testsuite/rust_version.rs

+33
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,39 @@ Caused by:
5757
.run();
5858
}
5959

60+
#[cargo_test]
61+
fn rust_version_good_pre_release() {
62+
project()
63+
.file(
64+
"Cargo.toml",
65+
r#"
66+
[package]
67+
name = "foo"
68+
version = "0.0.1"
69+
authors = []
70+
rust-version = "1.43.0-beta.1"
71+
[[bin]]
72+
name = "foo"
73+
"#,
74+
)
75+
.file("src/main.rs", "fn main() {}")
76+
.build()
77+
.cargo("check")
78+
.with_status(101)
79+
.with_stderr(
80+
"\
81+
error: failed to parse manifest at `[..]`
82+
83+
Caused by:
84+
TOML parse error at line 6, column 28
85+
|
86+
6 | rust-version = \"1.43.0-beta.1\"
87+
| ^^^^^^^^^^^^^^^
88+
expected a version like \"1.32\"",
89+
)
90+
.run();
91+
}
92+
6093
#[cargo_test]
6194
fn rust_version_bad_pre_release() {
6295
project()

0 commit comments

Comments
 (0)