summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-03-05 02:37:14 +0000
committerrsiddharth <s@ricketyspace.net>2018-03-05 02:37:14 +0000
commite357ce168c8f6a78df349fbb262d71bf46fe11b5 (patch)
tree5464528596427faf14849566a0248c654d2bc412
parent910df833d986dc1915fb40e784ec2e143b915c22 (diff)
tests: Add TestTWRenderer.test_render_footnote_item.
* tests/data/renderer-footnotes-w.md: New file. * tests/data/renderer-footnotes.md: New file. * tests/test_md_tw.py (TestTWRenderer) [test_render_footnote_item]: New test method.
-rw-r--r--tests/data/renderer-footnotes-w.md25
-rw-r--r--tests/data/renderer-footnotes.md24
-rw-r--r--tests/test_md_tw.py6
3 files changed, 54 insertions, 1 deletions
diff --git a/tests/data/renderer-footnotes-w.md b/tests/data/renderer-footnotes-w.md
new file mode 100644
index 0000000..63d4673
--- /dev/null
+++ b/tests/data/renderer-footnotes-w.md
@@ -0,0 +1,25 @@
+This phrase has a single line footnote[^foot1].
+
+[^foot1]: Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+
+This other phrase has a multiline footnote[^foot2].
+
+[^foot2]: Vestibulum enim wisi, viverra nec, fringilla in, laoreet
+ vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
+ sit amet velit.
+
+This phrase has a blockquote in its footnote[^foot3].
+
+[^foot3]: A footnote with blockquotes
+
+ Start of block quote in footnote:
+
+ > This is a blockquote with two paragraphs. Lorem ipsum
+ > dolor sit amet, consectetuer adipiscing elit. Aliquam
+ > hendrerit mi posuere lectus. Vestibulum enim wisi,
+ > viverra nec, fringilla in, laoreet vitae, risus.
+ >
+ > Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
+ > Suspendisse id sem consectetuer libero luctus adipiscing.
+
+ End of block quote in foot note.
diff --git a/tests/data/renderer-footnotes.md b/tests/data/renderer-footnotes.md
new file mode 100644
index 0000000..95af579
--- /dev/null
+++ b/tests/data/renderer-footnotes.md
@@ -0,0 +1,24 @@
+This phrase has a single line footnote[^foot1].
+
+[^foot1]: Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
+
+This other phrase has a multiline footnote[^foot2].
+
+[^foot2]: Vestibulum enim wisi, viverra nec, fringilla in, laoreet
+ vitae, risus. Donec sit amet nisl. Aliquam semper ipsum sit amet
+ velit.
+
+This phrase has a blockquote in its footnote[^foot3].
+
+[^foot3]: A footnote with blockquotes
+
+ Start of block quote in footnote:
+
+ > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
+ > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
+ > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
+ >
+ > Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
+ > id sem consectetuer libero luctus adipiscing.
+
+ End of block quote in foot note.
diff --git a/tests/test_md_tw.py b/tests/test_md_tw.py
index f2f5fd2..34fe766 100644
--- a/tests/test_md_tw.py
+++ b/tests/test_md_tw.py
@@ -485,7 +485,6 @@ class TestTWBlockLexer(object):
def test_parse_def_footnotes(self):
tokens = self._parse('blexer-footnotes.md')
-
def process(tokens):
token = tokens.pop(0)
while token:
@@ -829,6 +828,11 @@ class TestTWRenderer(object):
expected_txt = self._get('renderer-def-links-w.md')
self._validate(txt, expected_txt)
+ def test_render_footnote_item(self):
+ txt = self._md('renderer-footnotes.md')
+ expected_txt = self._get('renderer-footnotes-w.md')
+ self._validate(txt, expected_txt)
+
def teardown(self):
pass