summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2017-03-04 07:56:44 +0000
committerrsiddharth <s@ricketyspace.net>2017-03-04 07:56:44 +0000
commitc492802aacf8b59cc18cde1eb371561315ff791d (patch)
treeed178e66060b8376d70869db82049d7b40fa2808
parentaab16fc524986e0c70afb2d5b8ddbf5fc79e1e0b (diff)
tests: Update `test_mdl_style.TestLSRendererFN` class.
* tests/data/footnote_link_style_01-expected.md: New file. * tests/data/footnote_link_style_01.md: New file. * tests/test_mdl_style.py (TestLSRendererFN.test_link_inline_to_footnote_style_conversion_01): Add method.
-rw-r--r--tests/data/footnote_link_style_01-expected.md27
-rw-r--r--tests/data/footnote_link_style_01.md18
-rw-r--r--tests/test_mdl_style.py5
3 files changed, 50 insertions, 0 deletions
diff --git a/tests/data/footnote_link_style_01-expected.md b/tests/data/footnote_link_style_01-expected.md
new file mode 100644
index 0000000..0f56a8b
--- /dev/null
+++ b/tests/data/footnote_link_style_01-expected.md
@@ -0,0 +1,27 @@
+This is [an example][0] nibh tempor link.
+
+[0]: http://example.com/ (Title)
+
+[This link][1] quam erat volutpat.
+
+[1]: http://example.net/
+
+See my [About][2] page for details.
+
+[2]: /about/
+
+Cras [an example][3]
+non dapibus ipsum.
+
+[3]: http://example.com/ (Optional Title Here)
+
+Nullam semper, [an example][4]
+blandit sapien.
+
+[4]: http://example.com/ (Optional Title Here)
+
+There were [foo00][5]
+and [foo01][6] in the bar.
+
+[5]: http://example.com/foo/00 (Foo 00 Title)
+[6]: http://example.com/foo/01 (Foo 01 Title)
diff --git a/tests/data/footnote_link_style_01.md b/tests/data/footnote_link_style_01.md
new file mode 100644
index 0000000..4a02a81
--- /dev/null
+++ b/tests/data/footnote_link_style_01.md
@@ -0,0 +1,18 @@
+This is [an example](http://example.com/ "Title") nibh tempor link.
+
+[This link](http://example.net/) quam erat volutpat.
+
+See my [About][] page for details.
+
+[About]: /about/
+
+Cras [an example](http://example.com/ "Optional Title Here")
+non dapibus ipsum.
+
+Nullam semper, [an example](http://example.com/ "Optional Title Here")
+blandit sapien.
+
+There were [foo00](http://example.com/foo/00 "Foo 00 Title")
+and [foo01][foo-01] in the bar.
+
+[foo-01]: http://example.com/foo/01 (Foo 01 Title)
diff --git a/tests/test_mdl_style.py b/tests/test_mdl_style.py
index dd2a737..d752188 100644
--- a/tests/test_mdl_style.py
+++ b/tests/test_mdl_style.py
@@ -111,6 +111,11 @@ class TestLSRendererFN(object):
expected_result = _get_data('footnote_link_style_00-expected.md')
assert_equal(self.md(d), expected_result)
+ def test_link_inline_to_footnote_style_conversion_01(self):
+ d = _get_data('footnote_link_style_01.md')
+ expected_result = _get_data('footnote_link_style_01-expected.md')
+ assert_equal(self.md(d), expected_result)
+
def test_renderer_parses_images_00(self):
d = _get_data('footnote_parses_images_00.md')
expected_result = _get_data('footnote_parses_images_00-expected.md')