From b6a4d7a645c784b7bd3f6d64298d7b9047cf22c3 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sun, 18 Feb 2018 19:43:34 +0000 Subject: 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. --- tests/data/renderer-fences-w.md | 12 ++++++++++++ tests/data/renderer-fences.md | 12 ++++++++++++ tests/test_md_tw.py | 7 +++++++ 3 files changed, 31 insertions(+) create mode 100644 tests/data/renderer-fences-w.md create mode 100644 tests/data/renderer-fences.md diff --git a/tests/data/renderer-fences-w.md b/tests/data/renderer-fences-w.md new file mode 100644 index 0000000..5cbb95c --- /dev/null +++ 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 new file mode 100644 index 0000000..5cbb95c --- /dev/null +++ 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 index 2c300c5..47f354c 100644 --- 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) -- cgit v1.2.3