From c492802aacf8b59cc18cde1eb371561315ff791d Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Sat, 4 Mar 2017 07:56:44 +0000 Subject: 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. --- tests/data/footnote_link_style_01-expected.md | 27 +++++++++++++++++++++++++++ tests/data/footnote_link_style_01.md | 18 ++++++++++++++++++ tests/test_mdl_style.py | 5 +++++ 3 files changed, 50 insertions(+) create mode 100644 tests/data/footnote_link_style_01-expected.md create mode 100644 tests/data/footnote_link_style_01.md 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') -- cgit v1.2.3