Add a few more CDATA tests

pull/225/head
Vytautas Šaltenis 2015-12-16 20:53:40 +02:00
parent 594d923645
commit f5ac2ddf7a
1 changed files with 21 additions and 0 deletions

View File

@ -1544,6 +1544,27 @@ func TestCDATA(t *testing.T) {
"Lots of text\n\n<![CDATA[lots of te><t\non\nseveral\nlines]]>\n",
"<p>Lots of text</p>\n\n<![CDATA[lots of te><t\non\nseveral\nlines]]>\n",
"<![CDATA[>]]>\n",
"<![CDATA[>]]>\n",
}
doTestsBlock(t, tests, 0)
doTestsBlock(t, []string{
"``` html\n<![CDATA[foo]]>\n```\n",
"<pre><code class=\"language-html\">&lt;![CDATA[foo]]&gt;\n</code></pre>\n",
"<![CDATA[\n``` python\ndef func():\n pass\n```\n]]>\n",
"<![CDATA[\n``` python\ndef func():\n pass\n```\n]]>\n",
`<![CDATA[
> def func():
> pass
]]>
`,
`<![CDATA[
> def func():
> pass
]]>
`,
}, EXTENSION_FENCED_CODE)
}