Skip to content

Commit 909bd1c

Browse files
committed
Migrate mdbook_test_chapter_not_found to BookTest
1 parent f324aeb commit 909bd1c

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

tests/testing.rs

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/testsuite/test.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,16 @@ fn test_individual_chapter() {
7474
"#]]);
7575
});
7676
}
77+
78+
// Unknown chapter name.
79+
#[test]
80+
fn chapter_not_found() {
81+
BookTest::from_dir("test/passing_tests").run("test -c bogus", |cmd| {
82+
cmd.expect_failure()
83+
.expect_stdout(str![[""]])
84+
.expect_stderr(str![[r#"
85+
[TIMESTAMP] [ERROR] (mdbook::utils): Error: Chapter not found: bogus
86+
87+
"#]]);
88+
});
89+
}

0 commit comments

Comments
 (0)