aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest
diff options
context:
space:
mode:
authorDavid Vo <auscompgeek@users.noreply.github.com>2018-11-19 13:00:21 +1100
committerTrygve Aaberge <trygveaa@gmail.com>2019-01-25 23:45:04 +0100
commit6f23cff825da2d0ea62b164726e36be77b3d287b (patch)
tree91a021504551d88df31b8959c198ede984d5042b /_pytest
parentfb5612d641296a022a869bd0a4b9a0aed9255e51 (diff)
downloadwee-slack-6f23cff825da2d0ea62b164726e36be77b3d287b.tar.gz
Add tests for preserving formatting in code blocks
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/test_formatting.py13
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