mirror of
https://github.com/rust-lang/mdBook.git
synced 2025-12-27 09:05:40 -05:00
Merge pull request #2816 from szabgab/test/verify-more-specific-exception
test case: verify the more specific exception message
This commit is contained in:
@@ -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#"
|
||||
|
||||
Reference in New Issue
Block a user