X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=mudpy%2Ftests%2Fselftest.py;h=2325f62ec6d22734c4541c9b88d2420b3976d7c9;hp=202778a165c76db853a2775617ad442fb59ce580;hb=9ea1249e8e340f62483da7ea68d3c21b5e0018ea;hpb=da204426401f781b90121eac018166bcde5ee211 diff --git a/mudpy/tests/selftest.py b/mudpy/tests/selftest.py index 202778a..2325f62 100644 --- a/mudpy/tests/selftest.py +++ b/mudpy/tests/selftest.py @@ -111,6 +111,11 @@ test_forbid_ansi_input = ( (1, r'says, "\[35mfoo\[0m\."', ""), ) +test_escape_macros = ( + (0, '> ', "say $(red)bar$(nrm)"), + (1, r'says, "\$\(red\)bar\$\(nrm\)."', ""), +) + test_movement = ( (0, "> ", "move north"), (0, r"You exit to the north\.", ""), @@ -316,6 +321,7 @@ dialogue = ( (test_chat_mode, "chat mode"), (test_wrapping, "wrapping"), (test_forbid_ansi_input, "raw escape input is filtered"), + (test_escape_macros, "replacement macros are escaped"), (test_movement, "movement"), (test_actor_disappears, "actor spontaneous disappearance"), (test_account1_teardown, "second account teardown"),