diff --git a/tests/testsuite/rendering.rs b/tests/testsuite/rendering.rs index 7f2fffa9..961710ed 100644 --- a/tests/testsuite/rendering.rs +++ b/tests/testsuite/rendering.rs @@ -239,3 +239,25 @@ fn html_blocks() { fn code_block_fenced_with_indent() { BookTest::from_dir("rendering/code_blocks_fenced_with_indent").check_all_main_files(); } + +// Unclosed HTML tags. +// +// Note that the HTML parsing algorithm is much more complicated than what +// this is checking. +#[test] +fn unclosed_html_tags() { + BookTest::init(|_| {}) + .change_file("src/chapter_1.md", "
xfooxyz") + .run("build", |cmd| { + cmd.expect_stderr(str![[r#" + INFO Book building has started + INFO Running the html backend + INFO HTML book written to `[ROOT]/book` + +"#]]); + }) + .check_main_file( + "book/chapter_1.html", + str!["
xfooxyz
"], + ); +}