Still have to do the fix for zsh/fish
This commit is contained in:
Kovid Goyal
2022-02-27 10:20:19 +05:30
parent f9621b1e11
commit d53f8f24c4
7 changed files with 36 additions and 6 deletions

View File

@@ -266,6 +266,14 @@ PS1="{ps1}"
pty.wait_till(lambda: pty.screen.cursor.shape == 0)
pty.write_to_child('\x04')
pty.wait_till(lambda: pty.screen.cursor.shape == CURSOR_BEAM)
pty.write_to_child('\x04')
pty.send_cmd_to_child('clear')
pty.wait_till(lambda: pty.callbacks.titlebuf)
with self.run_shell(shell='bash', rc=f'''PS1="{ps1}"''') as pty:
pty.callbacks.clear()
pty.send_cmd_to_child('printf "%s\x16\a%s" "a" "b"')
pty.wait_till(lambda: 'ab' in pty.screen_contents())
self.ae(pty.screen_contents(), 'prompt> printf "%s^G%s" "a" "b"\nab')
for ps1 in ('line1\\nline\\2\\prompt> ', 'line1\nprompt> ', 'line1\\nprompt> ',):
with self.subTest(ps1=ps1), self.run_shell(