Skip to content

Commit 3f45b02

Browse files
authored
Merge pull request #2816 from szabgab/test/verify-more-specific-exception
test case: verify the more specific exception message
2 parents a40f1f2 + aced9f6 commit 3f45b02

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

crates/mdbook-core/src/config.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,19 @@ mod tests {
10931093
Config::from_str(src).unwrap();
10941094
}
10951095

1096+
#[test]
1097+
#[should_panic(
1098+
expected = "unknown variant `1999`, expected one of `2024`, `2021`, `2018`, `2015`\n"
1099+
)]
1100+
fn invalid_rust_edition_expected() {
1101+
let src = r#"
1102+
[rust]
1103+
edition = "1999"
1104+
"#;
1105+
1106+
Config::from_str(src).unwrap();
1107+
}
1108+
10961109
#[test]
10971110
fn print_config() {
10981111
let src = r#"

0 commit comments

Comments
 (0)