Diff options
Diffstat (limited to 'tests/extensions/test-about-render.lua')
| -rw-r--r-- | tests/extensions/test-about-render.lua | 8 |
1 file changed, 6 insertions, 2 deletions
diff --git a/tests/extensions/test-about-render.lua b/tests/extensions/test-about-render.lua index 6f54805..bdd4d84 100644 --- a/tests/extensions/test-about-render.lua +++ b/tests/extensions/test-about-render.lua @@ -222,6 +222,7 @@ h.contains("and only that text reaches the page", out, "<p>bad</p>") out = render("README.md", "[bad](//evil.example/x)") h.excludes("a scheme relative link renders no anchor", out, "<a ") +h.contains("and only its text reaches the page", out, "<p>bad</p>") out = render("README.md", "[q](https://example.com/a'b)") h.contains("a quote in a link target is escaped", out, "href='https://example.com/a'b'") @@ -332,9 +333,11 @@ h.contains("an indented block renders as code", out, out = render("README.md", "- item\n\n more about it") h.excludes("an indented paragraph after a list stays prose", out, "<pre>") +h.contains("and renders as a paragraph", out, "<p>more about it</p>") out = render("README.md", "[a](\\\\evil.example/x) [b](\\/evil.example/x)") h.excludes("a scheme relative link spelt with backslashes renders no anchor", out, "<a ") +h.contains("and only their text reaches the page", out, "<p>a b</p>") out = render("README.md", "| a | b |\n| --- | --- |\n| 1 | 2 |") h.contains("a pipe table renders its head", out, "<thead><tr><th>a</th><th>b</th></tr></thead>") @@ -345,6 +348,7 @@ h.contains("a table cuts a paragraph short", out, "<p>Pick one:</p><table><thead out = render("README.md", "a | b in prose") h.excludes("a pipe without a delimiter row stays prose", out, "<table") +h.contains("and renders as a paragraph", out, "<p>a | b in prose</p>") out = render("README.md", "| a | b |\n|---|---|\n| x \\| y | `p \\| q` |") h.contains("an escaped pipe stays in its cell", out, "<td>x | y</td><td><code>p | q</code></td>") @@ -461,8 +465,8 @@ h.contains("a definition ends at two dots with blanks after them", out, "<div class='markdown'><p>shown</p></div>") out = render("page.1", ".TP\n.PD 0\n.B \\-a\nall\n.PD\nDon\\*(Aqt") -h.excludes("a spacing macro draws nothing", out, ">0") -h.contains("DocBook's apostrophe string expands", out, "Don't") +h.equals("a spacing macro draws nothing and the apostrophe string expands", out, + "<div class='markdown'><p><strong>-a</strong><br>\nall\nDon't</p></div>") out = render("page.1", '.\\" a comment\nvisible') h.excludes("a roff comment is dropped", out, "comment") |
