Also test changing of title when running command

This commit is contained in:
Kovid Goyal
2022-02-21 20:44:10 +05:30
parent 261057396c
commit da5e37620e
3 changed files with 11 additions and 8 deletions

View File

@@ -213,18 +213,18 @@ class TestParser(BaseTest):
c = s.callbacks
pb('a\033]2;x\\ryz\x9cbcde', 'a', ('set_title', 'x\\ryz'), 'bcde')
self.ae(str(s.line(0)), 'abcde')
self.ae(c.titlebuf, 'x\\ryz')
self.ae(c.titlebuf, ['x\\ryz'])
c.clear()
pb('\033]\x07', ('set_title', ''), ('set_icon', ''))
self.ae(c.titlebuf, ''), self.ae(c.iconbuf, '')
self.ae(c.titlebuf, ['']), self.ae(c.iconbuf, '')
pb('\033]ab\x07', ('set_title', 'ab'), ('set_icon', 'ab'))
self.ae(c.titlebuf, 'ab'), self.ae(c.iconbuf, 'ab')
self.ae(c.titlebuf, ['', 'ab']), self.ae(c.iconbuf, 'ab')
c.clear()
pb('\033]2;;;;\x07', ('set_title', ';;;'))
self.ae(c.titlebuf, ';;;')
self.ae(c.titlebuf, [';;;'])
c.clear()
pb('\033]2;\x07', ('set_title', ''))
self.ae(c.titlebuf, '')
self.ae(c.titlebuf, [''])
pb('\033]110\x07', ('set_dynamic_color', 110, ''))
self.ae(c.colorbuf, '')
c.clear()