diff options
author | David Vo <auscompgeek@users.noreply.github.com> | 2018-11-19 13:00:21 +1100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-01-25 23:45:04 +0100 |
commit | 6f23cff825da2d0ea62b164726e36be77b3d287b (patch) | |
tree | 91a021504551d88df31b8959c198ede984d5042b /_pytest/test_formatting.py | |
parent | fb5612d641296a022a869bd0a4b9a0aed9255e51 (diff) | |
download | wee-slack-6f23cff825da2d0ea62b164726e36be77b3d287b.tar.gz |
Add tests for preserving formatting in code blocks
Diffstat (limited to '_pytest/test_formatting.py')
-rw-r--r-- | _pytest/test_formatting.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/_pytest/test_formatting.py b/_pytest/test_formatting.py index dc1d732..c35b70e 100644 --- a/_pytest/test_formatting.py +++ b/_pytest/test_formatting.py @@ -12,3 +12,16 @@ import wee_slack ]) def test_does_not_format(text): assert wee_slack.render_formatting(text) == text + + +@pytest.mark.parametrize("text", [ + "`hello *bar*`", + "`*`", + "`* *`", + "`* * *`", + "`* * * *`", + "`* * * * *`", + "`* * * * * *`", +]) +def test_preserves_format_chars_in_code(text): + assert wee_slack.render_formatting(text) == text |