X-Git-Url: http://nitlanguage.org diff --git a/lib/markdown/test_markdown.nit b/lib/markdown/test_markdown.nit index 5d1b101..8a2c7a0 100644 --- a/lib/markdown/test_markdown.nit +++ b/lib/markdown/test_markdown.nit @@ -814,6 +814,36 @@ This is an image baz in a regular paragraph. assert res == exp end + fun test_process_xml4 do + var test = """ +

This is an example of a block element that should be escaped.

+

Idem for the second paragraph.

+""" + var exp = test + var res = test.md_to_html.write_to_string + assert res == exp + end + + fun test_process_xml5 do + var test = """ +# Some more XML tests + +

This is an example of a block element that should be escaped.

+

Idem for the second paragraph.

+ +With a *md paragraph*! +""" + var exp = """ +

Some more XML tests

+

This is an example of a block element that should be escaped.

+

Idem for the second paragraph.

+

With a md paragraph!

+""" + var res = test.md_to_html.write_to_string + print res + assert res == exp + end + fun test_process_span_code1 do var test = "Use the `printf()` function." var exp = "

Use the printf() function.

\n" @@ -2800,7 +2830,7 @@ class TestTokenProcessor redef fun token_at(input, pos) do var token = super if token isa TokenNone then return token - var res = "{token.class_name} at {token.location}" + var res = "{token.class_name} at {token.location or else "?"}" var exp = test_stack.shift print "" print "EXP {exp}"