summaryrefslogtreecommitdiffstats
path: root/tests/test_md_tw.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-01-02 00:39:27 +0000
committerrsiddharth <s@ricketyspace.net>2018-01-02 00:39:27 +0000
commit06fd732f8d1b4b1d6ef7313df8f441009c781cd7 (patch)
treec82af68dc039d800129b2fc3f9cf8e1456e26589 /tests/test_md_tw.py
parenta18df9d9adc54bbc8ea1f3b1a1c59f316667e840 (diff)
md_tw: Add TWBlockLexer.parse_heading.
* md_tw.py (TWBlockLexer.parse_heading): New method. * tests/data/blexer-heading.md: New file. * tests/test_md_tw.py (TestTWBlockLexer.test_parse_heading): New test.
Diffstat (limited to 'tests/test_md_tw.py')
-rw-r--r--tests/test_md_tw.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_md_tw.py b/tests/test_md_tw.py
index 032ef93..af2ce45 100644
--- a/tests/test_md_tw.py
+++ b/tests/test_md_tw.py
@@ -68,6 +68,17 @@ class TestTWBlockLexer(object):
self._validate(tokens, 'code', expected_fences)
+ def test_parse_heading(self):
+ tokens = self._parse('blexer-heading.md')
+
+ expected_hs = [
+ '# Milky Chance\n\n',
+ '## Flashed\n\n',
+ '### Junk Mind\n\n',
+ ]
+
+ self._validate(tokens, 'heading', expected_hs)
+
def teardown(self):
pass