test case: verify the more specific exception message

This commit is contained in:
Gabor Szabo 2025-08-24 11:18:57 +03:00
parent 313be7162f
commit aced9f609c

View file

@ -1093,6 +1093,19 @@ mod tests {
Config::from_str(src).unwrap();
}
#[test]
#[should_panic(
expected = "unknown variant `1999`, expected one of `2024`, `2021`, `2018`, `2015`\n"
)]
fn invalid_rust_edition_expected() {
let src = r#"
[rust]
edition = "1999"
"#;
Config::from_str(src).unwrap();
}
#[test]
fn print_config() {
let src = r#"