Examine 8 bytes at once for terminator char

This commit is contained in:
Kovid Goyal
2023-11-10 08:05:01 +05:30
parent f4819175b0
commit 200e5bf6e3
3 changed files with 37 additions and 10 deletions

View File

@@ -347,9 +347,9 @@ class TestParser(BaseTest):
self.ae(c.colorbuf, '')
c.clear()
pb('\033]9;\x07', ('desktop_notify', 9, ''))
pb('\033]9;test it\x07', ('desktop_notify', 9, 'test it'))
pb('\033]9;test it with a nice long string\x07', ('desktop_notify', 9, 'test it with a nice long string'))
pb('\033]99;moo=foo;test it\x07', ('desktop_notify', 99, 'moo=foo;test it'))
self.ae(c.notifications, [(9, ''), (9, 'test it'), (99, 'moo=foo;test it')])
self.ae(c.notifications, [(9, ''), (9, 'test it with a nice long string'), (99, 'moo=foo;test it')])
c.clear()
pb('\033]8;;\x07', ('set_active_hyperlink', None, None))
pb('\033]8moo\x07', ('Ignoring malformed OSC 8 code',))