+test_telnet_iac = (
+ # Send a double (escaped) IAC byte within other text, which should get
+ # unescaped and deduplicated to a single \xff in the buffer and then
+ # the line of input discarded as a non-UTF-8 sequence
+ (2, "> ", b"say argle\xff\xffbargle\r\n"),
+ (2, r"Non-UTF-8 sequence from admin: b'say argle\\xffbargle'.*> ", ""),
+)
+
+test_telnet_unknown = (
+ # Send an unsupported negotiation command #127 which should get filtered
+ # from the line of input
+ (2, "> ", b"say glop\xff\x7fglyf\r\n"),
+ (2, r'Unknown Telnet IAC command 127 ignored\..*"Glopglyf\.".*> ', ""),
+)
+