Merge pull request #2816 from szabgab/test/verify-more-specific-exception
test case: verify the more specific exception message
This commit is contained in:
commit
3f45b024f2
1 changed files with 13 additions and 0 deletions
|
|
@ -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#"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue