markdown-textwrap

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

commit b6a4d7a645c784b7bd3f6d64298d7b9047cf22c3
parent 9f74cc4b801657862631235918da8217c9360160
Author: rsiddharth <s@ricketyspace.net>
Date:   Sun, 18 Feb 2018 19:43:34 +0000

tests: Update TestTWRenderer.test_render_block_code.

* tests/data/renderer-fences-w.md: New file.
* tests/data/renderer-fences.md: New file.
* tests/test_md_tw.py (test_render_block_code): Update test method.

Diffstat:
tests/data/renderer-fences-w.md | 12++++++++++++
tests/data/renderer-fences.md | 12++++++++++++
tests/test_md_tw.py | 7+++++++
3 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/tests/data/renderer-fences-w.md b/tests/data/renderer-fences-w.md @@ -0,0 +1,12 @@ +Let's have some chaos: + +```bash +$ echo 'Zap!' +$ rm -rf / +``` +> Some Jaromil art inside a block quote +> +> ```bash +> $ :(){:|:&};: +> ``` +> For more look at jaramil.dyne.org. He's awesome. diff --git a/tests/data/renderer-fences.md b/tests/data/renderer-fences.md @@ -0,0 +1,12 @@ +Let's have some chaos: + +```bash +$ echo 'Zap!' +$ rm -rf / +``` +> Some Jaromil art inside a block quote +> +> ```bash +> $ :(){:|:&};: +> ``` +> For more look at jaramil.dyne.org. He's awesome. diff --git a/tests/test_md_tw.py b/tests/test_md_tw.py @@ -799,11 +799,18 @@ class TestTWRenderer(object): self._validate(txt, expected_txt) def test_render_block_code(self): + # Test block code (spaces) txt = self._md('renderer-block-code.md') expected_txt = self._get('renderer-block-code-w.md') self._validate(txt, expected_txt) + # Test block code (fences) + txt = self._md('renderer-fences.md') + expected_txt = self._get('renderer-fences-w.md') + + self._validate(txt, expected_txt) + def teardown(self): if self.del_tmp_dir: shutil.rmtree(self.tmp_dir)