summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/data/blexer-fences.md12
-rw-r--r--tests/test_md_tw.py10
2 files changed, 22 insertions, 0 deletions
diff --git a/tests/data/blexer-fences.md b/tests/data/blexer-fences.md
new file mode 100644
index 0000000..5cbb95c
--- /dev/null
+++ b/tests/data/blexer-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 2496f43..032ef93 100644
--- a/tests/test_md_tw.py
+++ b/tests/test_md_tw.py
@@ -58,6 +58,16 @@ class TestTWBlockLexer(object):
]
self._validate(tokens, 'code', expected_bc)
+ def test_parse_fences(self):
+ tokens = self._parse('blexer-fences.md')
+
+ expected_fences = [
+ '```bash\n$ echo \'Zap!\'\n$ rm -rf /\n```\n',
+ '```bash\n$ :(){:|:&};:\n```\n'
+ ]
+
+ self._validate(tokens, 'code', expected_fences)
+
def teardown(self):
pass