Skip to content

Commit

Permalink
test(manifest): Verify error on good pre-release
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Aug 30, 2023
1 parent a2830db commit ccedb8f
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/testsuite/rust_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,39 @@ Caused by:
.run();
}

#[cargo_test]
fn rust_version_good_pre_release() {
project()
.file(
"Cargo.toml",
r#"
[package]
name = "foo"
version = "0.0.1"
authors = []
rust-version = "1.43.0-beta.1"
[[bin]]
name = "foo"
"#,
)
.file("src/main.rs", "fn main() {}")
.build()
.cargo("check")
.with_status(101)
.with_stderr(
"\
error: failed to parse manifest at `[..]`
Caused by:
TOML parse error at line 6, column 28
|
6 | rust-version = \"1.43.0-beta.1\"
| ^^^^^^^^^^^^^^^
expected a version like \"1.32\"",
)
.run();
}

#[cargo_test]
fn rust_version_bad_pre_release() {
project()
Expand Down

0 comments on commit ccedb8f

Please sign in to comment.