mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 02:36:32 +01:00
FORCEENDLINE is True by default so no need to set
Test also updated to check FORCEENDLINE after TTYPE is negotiated
This commit is contained in:
parent
da9128dcdf
commit
e9c66530cd
2 changed files with 1 additions and 6 deletions
|
|
@ -231,7 +231,6 @@ class TestTelnet(TwistedTestCase):
|
|||
self.transport.client = ["localhost"]
|
||||
self.transport.setTcpKeepAlive = Mock()
|
||||
d = self.proto.makeConnection(self.transport)
|
||||
|
||||
# test suppress_ga
|
||||
self.assertTrue(self.proto.protocol_flags["NOGOAHEAD"])
|
||||
self.proto.dataReceived(IAC + DONT + SUPPRESS_GA)
|
||||
|
|
@ -246,13 +245,13 @@ class TestTelnet(TwistedTestCase):
|
|||
self.assertEqual(self.proto.protocol_flags["SCREENHEIGHT"][0], 45)
|
||||
self.assertEqual(self.proto.handshakes, 6)
|
||||
# test ttype
|
||||
self.assertTrue(self.proto.protocol_flags["FORCEDENDLINE"])
|
||||
self.assertFalse(self.proto.protocol_flags["TTYPE"])
|
||||
self.assertTrue(self.proto.protocol_flags["ANSI"])
|
||||
self.proto.dataReceived(IAC + WILL + TTYPE)
|
||||
self.proto.dataReceived(b"".join([IAC, SB, TTYPE, IS, b"MUDLET", IAC, SE]))
|
||||
self.assertTrue(self.proto.protocol_flags["XTERM256"])
|
||||
self.assertEqual(self.proto.protocol_flags["CLIENTNAME"], "MUDLET")
|
||||
self.assertTrue(self.proto.protocol_flags["FORCEDENDLINE"])
|
||||
self.proto.dataReceived(b"".join([IAC, SB, TTYPE, IS, b"XTERM", IAC, SE]))
|
||||
self.proto.dataReceived(b"".join([IAC, SB, TTYPE, IS, b"MTTS 137", IAC, SE]))
|
||||
self.assertEqual(self.proto.handshakes, 5)
|
||||
|
|
|
|||
|
|
@ -119,10 +119,6 @@ class Ttype(object):
|
|||
if clientname.startswith("MUDLET"):
|
||||
# supports xterm256 stably since 1.1 (2010?)
|
||||
xterm256 = clientname.split("MUDLET", 1)[1].strip() >= "1.1"
|
||||
self.protocol.protocol_flags["FORCEDENDLINE"] = True
|
||||
|
||||
if clientname.startswith("TINTIN++"):
|
||||
self.protocol.protocol_flags["FORCEDENDLINE"] = True
|
||||
|
||||
if (
|
||||
clientname.startswith("XTERM")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue