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

@@ -67,8 +67,10 @@ RPS1="{rps1}"
except TimeoutError:
raise AssertionError(f'Cursor was not changed to beam. Screen contents: {repr(pty.screen_contents())}')
self.ae(pty.screen_contents(), q)
self.ae(pty.callbacks.titlebuf, '~')
self.ae(pty.callbacks.titlebuf, ['~'])
pty.callbacks.clear()
pty.send_cmd_to_child('mkdir test && ls -a')
pty.wait_till(lambda: pty.screen_contents().count(ps1) == 2)
self.ae(pty.callbacks.titlebuf, ['mkdir test && ls -a', '~'])
q = '\n'.join(str(pty.screen.line(i)) for i in range(1, pty.screen.cursor.y))
self.ae(pty.last_cmd_output(), q)