aboutsummaryrefslogtreecommitdiffstats
path: root/_pytest
diff options
context:
space:
mode:
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