Merge pull request #2816 from szabgab/test/verify-more-specific-exception

test case: verify the more specific exception message
This commit is contained in:
Eric Huss
2025-08-25 16:49:13 +00:00
committed by GitHub

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#"