mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
Rework increment param in pexpect.expect_prompt
This switches the 'increment' param from "after" to "before." Instead of expect_prompt saying if the next prompt will be incremented, each call site says if it should have been incremented sinec the last prompt.
This commit is contained in:
@@ -3,7 +3,7 @@ from pexpect_helper import SpawnedProc
|
||||
|
||||
sp = SpawnedProc()
|
||||
send, sendline, sleep, expect_prompt = sp.send, sp.sendline, sp.sleep, sp.expect_prompt
|
||||
expect_prompt(increment=False)
|
||||
expect_prompt()
|
||||
|
||||
# Clear twice (regression test for #7280).
|
||||
send("\f")
|
||||
@@ -280,12 +280,12 @@ expect_prompt("qqq", unmatched="Leading qs not stripped")
|
||||
# Test bigword with single-character words.
|
||||
sendline("bind \cg kill-bigword")
|
||||
expect_prompt()
|
||||
send("a b c d\x01") # ctrl-a, move back to the beginning of the line
|
||||
send("\x07") # ctrl-g, kill bigword
|
||||
send("a b c d\x01") # ctrl-a, move back to the beginning of the line
|
||||
send("\x07") # ctrl-g, kill bigword
|
||||
sendline("echo")
|
||||
expect_prompt("^b c d")
|
||||
|
||||
send(" a b c d\x01") # ctrl-a, move back to the beginning of the line
|
||||
send("\x07") # ctrl-g, kill bigword
|
||||
send(" a b c d\x01") # ctrl-a, move back to the beginning of the line
|
||||
send("\x07") # ctrl-g, kill bigword
|
||||
sendline("echo")
|
||||
expect_prompt("^b c d")
|
||||
|
||||
Reference in New Issue
Block a user