summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2017-03-04 07:54:26 +0000
committerrsiddharth <s@ricketyspace.net>2017-03-04 07:54:26 +0000
commitaab16fc524986e0c70afb2d5b8ddbf5fc79e1e0b (patch)
tree47d3116863e91ea2bd3e5fa2cc91ee4a93c52fd8
parent6fbea4b886aefcc6830c7abe9dcda2f99a200674 (diff)
tests: Update `test_mdl_style.TestLSRendererIL` class.
* tests/data/inline_link_style_01-expected.md: New file. * tests/data/inline_link_style_01.md: New file. * tests/test_mdl_style.py (TestLSRendererIL.test_link_footnote_to_inline_style_conversion_01): Add method.
-rw-r--r--tests/data/inline_link_style_01-expected.md12
-rw-r--r--tests/data/inline_link_style_01.md19
-rw-r--r--tests/test_mdl_style.py5
3 files changed, 36 insertions, 0 deletions
diff --git a/tests/data/inline_link_style_01-expected.md b/tests/data/inline_link_style_01-expected.md
new file mode 100644
index 0000000..e9fb813
--- /dev/null
+++ b/tests/data/inline_link_style_01-expected.md
@@ -0,0 +1,12 @@
+This is [an example](http://example.com/ "Title") inline link.
+
+[This link](http://example.net/) has no title attribute.
+
+See my [About](/about/) page for details.
+
+Sed faucibus convallis [an example](http://example.com/ "Optional Title Here") justo et congue link.
+
+Iaculis purus sed [an example](http://example.com/ "Optional Title Here") porttitor id link.
+
+There were [foo00](http://example.com/foo/00 "Foo 00 Title") and [foo01](http://example.com/foo/01 "Foo 01 Title") in the
+bar.
diff --git a/tests/data/inline_link_style_01.md b/tests/data/inline_link_style_01.md
new file mode 100644
index 0000000..6799061
--- /dev/null
+++ b/tests/data/inline_link_style_01.md
@@ -0,0 +1,19 @@
+This is [an example](http://example.com/ "Title") inline link.
+
+[This link](http://example.net/) has no title attribute.
+
+See my [About][] page for details.
+
+[About]: /about/
+
+Sed faucibus convallis [an example][id] justo et congue link.
+
+Iaculis purus sed [an example] [id] porttitor id link.
+
+[id]: http://example.com/ "Optional Title Here"
+
+There were [foo00][foo-00] and [foo01][foo-01] in the
+bar.
+
+[foo-00]: http://example.com/foo/00 "Foo 00 Title"
+[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 ce35c03..dd2a737 100644
--- a/tests/test_mdl_style.py
+++ b/tests/test_mdl_style.py
@@ -47,6 +47,11 @@ class TestLSRendererIL(object):
expected_result = _get_data('inline_link_style_00-expected.md')
assert_equal(self.md(d), expected_result)
+ def test_link_footnote_to_inline_style_conversion_01(self):
+ d = _get_data('inline_link_style_01.md')
+ expected_result = _get_data('inline_link_style_01-expected.md')
+ assert_equal(self.md(d), expected_result)
+
def test_renderer_parses_images_00(self):
d = _get_data('inline_parses_images_00.md')
expected_result = _get_data('inline_parses_images_00-expected.md')