From aced9f609c39558c78648aef04bccaef0913f2ca Mon Sep 17 00:00:00 2001 From: Gabor Szabo Date: Sun, 24 Aug 2025 11:18:57 +0300 Subject: [PATCH] test case: verify the more specific exception message --- crates/mdbook-core/src/config.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/mdbook-core/src/config.rs b/crates/mdbook-core/src/config.rs index 32e2e9dcf9..81c6dc5269 100644 --- a/crates/mdbook-core/src/config.rs +++ b/crates/mdbook-core/src/config.rs @@ -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#"