summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-02-18 19:43:34 +0000
committerrsiddharth <s@ricketyspace.net>2018-02-18 19:43:34 +0000
commitb6a4d7a645c784b7bd3f6d64298d7b9047cf22c3 (patch)
treeb5459fedb6d327b2901a712e157b8828507f0396 /tests
parent9f74cc4b801657862631235918da8217c9360160 (diff)
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 (limited to 'tests')
-rw-r--r--tests/data/renderer-fences-w.md12
-rw-r--r--tests/data/renderer-fences.md12
-rw-r--r--tests/test_md_tw.py7
3 files changed, 31 insertions, 0 deletions
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)