From 30ccf03fa849b5c6b550ab85aabce860a16b16cf Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Wed, 15 Feb 2023 22:05:29 -0600 Subject: add more testing and fix small bugs --- tests/test_pymdvar.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'tests/test_pymdvar.py') 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', '

foo bar

'), ('foo *test* bar', '

foo test bar

'), - ('foo **test** bar', '

foo test bar

') + ('foo **test** bar', '

foo test bar

'), + ('foo $test bar', '

foo $test bar

'), + ('foo *${test* bar', '

foo ${test bar

'), + ('foo **$test}** bar', '

foo $test} bar

'), ]) 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', '

foo value bar

'), ('foo *${test}* bar', '

foo value bar

'), - ('foo **${test}** bar', '

foo value bar

') + ('foo **${test}** bar', '

foo value bar

'), + ('foo [link](${test}/a.html) bar', '

foo link bar

'), + ('foo ![image](${test}/a.jpg) bar', '

foo image bar

'), ]) def test_simple_replacements(in_str, exp_str): out_str = markdown(in_str, extensions=[VariableExtension(variables={'test':'value'})]) -- cgit v1.2.3-70-g09d2