mirror of
https://github.com/venthur/blag.git
synced 2025-11-25 20:52:43 +00:00
Added some test cases for the MarkdownLinktreeProcessor
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
* respective default answers will be written to config if user provided no
|
||||
answer
|
||||
* added tests for quickstart
|
||||
* Added some test cases for the MarkdownLinktreeProcessor
|
||||
|
||||
## [1.3.1] - 2022-06-10
|
||||
|
||||
|
||||
@@ -32,6 +32,20 @@ def test_convert_markdown_links(input_, expected):
|
||||
assert expected in html
|
||||
|
||||
|
||||
@pytest.mark.parametrize("input_, expected", [
|
||||
# scheme
|
||||
('[test](https://)', 'https://'),
|
||||
# netloc
|
||||
('[test](//test.md)', '//test.md'),
|
||||
# no path
|
||||
('[test]()', ''),
|
||||
])
|
||||
def test_dont_convert_normal_links(input_, expected):
|
||||
md = markdown_factory()
|
||||
html, _ = convert_markdown(md, input_)
|
||||
assert expected in html
|
||||
|
||||
|
||||
@pytest.mark.parametrize("input_, expected", [
|
||||
('foo: bar', {'foo': 'bar'}),
|
||||
('foo: those are several words', {'foo': 'those are several words'}),
|
||||
|
||||
Reference in New Issue
Block a user