diff options
Diffstat (limited to 'tests/test_pymdvar.py')
-rw-r--r-- | tests/test_pymdvar.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_pymdvar.py b/tests/test_pymdvar.py index 2e305ec..69ffe56 100644 --- a/tests/test_pymdvar.py +++ b/tests/test_pymdvar.py @@ -14,7 +14,10 @@ def test_empty_input(): @pytest.mark.parametrize('in_str, exp_str', [ ('foo bar', '<p>foo bar</p>'), ('foo *test* bar', '<p>foo <em>test</em> bar</p>'), - ('foo **test** bar', '<p>foo <strong>test</strong> bar</p>') + ('foo **test** bar', '<p>foo <strong>test</strong> bar</p>'), + ('foo $test bar', '<p>foo $test bar</p>'), + ('foo *${test* bar', '<p>foo <em>${test</em> bar</p>'), + ('foo **$test}** bar', '<p>foo <strong>$test}</strong> bar</p>'), ]) def test_non_replacements(in_str, exp_str): out_str = markdown(in_str, extensions=[VariableExtension()]) @@ -24,7 +27,9 @@ def test_non_replacements(in_str, exp_str): @pytest.mark.parametrize('in_str, exp_str', [ ('foo ${test} bar', '<p>foo value bar</p>'), ('foo *${test}* bar', '<p>foo <em>value</em> bar</p>'), - ('foo **${test}** bar', '<p>foo <strong>value</strong> bar</p>') + ('foo **${test}** bar', '<p>foo <strong>value</strong> bar</p>'), + ('foo [link](${test}/a.html) bar', '<p>foo <a href="value/a.html">link</a> bar</p>'), + ('foo ![image](${test}/a.jpg) bar', '<p>foo <img alt="image" src="value/a.jpg" /> bar</p>'), ]) def test_simple_replacements(in_str, exp_str): out_str = markdown(in_str, extensions=[VariableExtension(variables={'test':'value'})]) |