diff --git a/tests/testsuite/preprocessor.rs b/tests/testsuite/preprocessor.rs index 030b12ea..f2a05b30 100644 --- a/tests/testsuite/preprocessor.rs +++ b/tests/testsuite/preprocessor.rs @@ -149,3 +149,19 @@ fn relative_command_path() { .check_file("support-check", "html") .check_file("preprocessor-ran", "test"); } + +// Preprocessor command is missing. +#[test] +fn missing_preprocessor() { + BookTest::from_dir("preprocessor/missing_preprocessor").run("build", |cmd| { + cmd.expect_stdout(str![[""]]) + .expect_stderr(str![[r#" +[TIMESTAMP] [INFO] (mdbook_driver::mdbook): Book building has started +[TIMESTAMP] [WARN] (mdbook_driver::builtin_preprocessors::cmd): The command wasn't found, is the "missing" preprocessor installed? +[TIMESTAMP] [WARN] (mdbook_driver::builtin_preprocessors::cmd): [TAB]Command: trduyvbhijnorgevfuhn +[TIMESTAMP] [INFO] (mdbook_driver::mdbook): Running the html backend +[TIMESTAMP] [INFO] (mdbook_html::html_handlebars::hbs_renderer): HTML book written to `[ROOT]/book` + +"#]]); + }); +} diff --git a/tests/testsuite/preprocessor/missing_preprocessor/book.toml b/tests/testsuite/preprocessor/missing_preprocessor/book.toml new file mode 100644 index 00000000..6a5241f3 --- /dev/null +++ b/tests/testsuite/preprocessor/missing_preprocessor/book.toml @@ -0,0 +1,3 @@ +[preprocessor.missing] +command = "trduyvbhijnorgevfuhn" + diff --git a/tests/testsuite/preprocessor/missing_preprocessor/src/SUMMARY.md b/tests/testsuite/preprocessor/missing_preprocessor/src/SUMMARY.md new file mode 100644 index 00000000..e69de29b