summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7d59395)
Add a simple regression test to make sure ANSI escape sequences
aren't allowed in input lines. The escape (byte \x1b) character
should be filtered from non-binary-mode clients because we filter to
a "printable" set. For binary-mode clients an escape won't be valid
UTF-8 and so will cause the entire line of input on which it's found
to be skipped.
(1, r'says,\r\n"O[o]+\."', ""),
)
(1, r'says,\r\n"O[o]+\."', ""),
)
+test_forbid_ansi_input = (
+ (0, '> ', "say \x1b[35mfoo\x1b[0m"),
+ (1, r'says, "\[35mfoo\[0m\."', ""),
+)
+
test_movement = (
(0, "> ", "move north"),
(0, r"You exit to the north\.", ""),
test_movement = (
(0, "> ", "move north"),
(0, r"You exit to the north\.", ""),
(test_sentence_capitalization, "sentence capitalization"),
(test_chat_mode, "chat mode"),
(test_wrapping, "wrapping"),
(test_sentence_capitalization, "sentence capitalization"),
(test_chat_mode, "chat mode"),
(test_wrapping, "wrapping"),
+ (test_forbid_ansi_input, "raw escape input is filtered"),
(test_movement, "movement"),
(test_actor_disappears, "actor spontaneous disappearance"),
(test_account1_teardown, "second account teardown"),
(test_movement, "movement"),
(test_actor_disappears, "actor spontaneous disappearance"),
(test_account1_teardown, "second account teardown"),