markdown-link-style

switch between inline and footnote link style in markdown documents.
git clone git://git.ricketyspace.net/markdown-link-style.git
Log | Files | Refs

commit c492802aacf8b59cc18cde1eb371561315ff791d
parent aab16fc524986e0c70afb2d5b8ddbf5fc79e1e0b
Author: rsiddharth <s@ricketyspace.net>
Date:   Sat,  4 Mar 2017 07:56:44 +0000

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.

Diffstat:
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(+), 0 deletions(-)

diff --git a/tests/data/footnote_link_style_01-expected.md 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 @@ -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 @@ -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')