markdown-textwrap

text wrap markdown documents
git clone git://git.ricketyspace.net/markdown-textwrap.git
Log | Files | Refs

commit 87936b0d2113ac0dbba604d7ac1625399c0051d8
parent 05c68a203e39272d16a1d6109da2140d628fd9e7
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat, 24 Feb 2018 21:32:46 +0000

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.

Diffstat:
tests/data/renderer-lists-w.md | 63+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/data/renderer-lists.md | 66++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/test_md_tw.py | 6++++++
3 files changed, 135 insertions(+), 0 deletions(-)

diff --git a/tests/data/renderer-lists-w.md 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 @@ -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 @@ -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