From 87936b0d2113ac0dbba604d7ac1625399c0051d8 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 24 Feb 2018 21:32:46 +0000 Subject: tests: Add TestTWRenderer.test_render_list. * tests/data/renderer-lists-w.md: New file. * tests/data/renderer-lists.md: New file. * tests/test_md_tw.py (test_render_list): New test method. --- tests/data/renderer-lists-w.md | 63 ++++++++++++++++++++++++++++++++++++++++ tests/data/renderer-lists.md | 66 ++++++++++++++++++++++++++++++++++++++++++ tests/test_md_tw.py | 6 ++++ 3 files changed, 135 insertions(+) create mode 100644 tests/data/renderer-lists-w.md create mode 100644 tests/data/renderer-lists.md (limited to 'tests') diff --git a/tests/data/renderer-lists-w.md b/tests/data/renderer-lists-w.md new file mode 100644 index 0000000..e0f3eba --- /dev/null +++ b/tests/data/renderer-lists-w.md @@ -0,0 +1,63 @@ ++ Re: Your Brains ++ Shop Vac ++ Flickr + + +1. First of May +2. You Ruined Everything +3. Sucker Punch + + +* 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. + + +* 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. + + +* Codey Monkey + +* Tom Cruise Crazy + + +1. This is a list item 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. + +2. Suspendisse id sem consectetuer libero luctus adipiscing. + + +* This is a list item with two paragraphs. + + This is the second paragraph in the list item. You're only required + to indent the first line. Lorem ipsum dolor sit amet, consectetuer + adipiscing elit. + +* Another item in the same list. + + +* A list item with a blockquote: + + > This is a blockquote inside a list item. + + +* A list item with a code block: + + $ :(){:|:&};: + + +1. This is a list item has a nested list. + + 1. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. + Aliquam hendrerit mi posuere lectus. + + $ :(){:|:&};: diff --git a/tests/data/renderer-lists.md b/tests/data/renderer-lists.md new file mode 100644 index 0000000..2a9a0dd --- /dev/null +++ b/tests/data/renderer-lists.md @@ -0,0 +1,66 @@ ++ Re: Your Brains ++ Shop Vac ++ Flickr + + +1. First of May +2. You Ruined Everything +3. Sucker Punch + + +* 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. + + +* 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. + + +* Codey Monkey + +* Tom Cruise Crazy + + +1. This is a list item 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. + +2. Suspendisse id sem consectetuer libero luctus adipiscing. + + +* This is a list item with two paragraphs. + + This is the second paragraph in the list item. You're +only required to indent the first line. Lorem ipsum dolor +sit amet, consectetuer adipiscing elit. + +* Another item in the same list. + + +* A list item with a blockquote: + + > This is a blockquote + > inside a list item. + + +* A list item with a code block: + + $ :(){:|:&};: + + +1. This is a list item has a nested list. + + 1. Lorem ipsum dolor sit amet, consectetuer adipiscing + elit. Aliquam hendrerit mi posuere lectus. + + $ :(){:|:&};: diff --git a/tests/test_md_tw.py b/tests/test_md_tw.py index d1e0833..a7a4bd0 100644 --- a/tests/test_md_tw.py +++ b/tests/test_md_tw.py @@ -804,6 +804,12 @@ class TestTWRenderer(object): self._validate(txt, expected_txt) + def test_render_list(self): + txt = self._md('renderer-lists.md') + expected_txt = self._get('renderer-lists-w.md') + + self._validate(txt, expected_txt) + def teardown(self): pass -- cgit v1.2.3