Add a test for unclosed HTML tags
This commit is contained in:
parent
cc7f8be496
commit
4417f8cb0a
1 changed files with 22 additions and 0 deletions
|
|
@ -239,3 +239,25 @@ fn html_blocks() {
|
||||||
fn code_block_fenced_with_indent() {
|
fn code_block_fenced_with_indent() {
|
||||||
BookTest::from_dir("rendering/code_blocks_fenced_with_indent").check_all_main_files();
|
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", "<div>x<span>foo<i>xyz")
|
||||||
|
.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!["<div>x<span>foo<i>xyz</i></span></div>"],
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue