mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
tests: Check that ctrl-z can be bound
We've heard news of this regressing, so let's add the test that should have been there already (mea culpa!). Because we now use POSIX_VDISABLE, this should also work in tandem with ctrl-space (which sends NUL), but we can't test *that* because some systems might not have POSIX_VDISABLE.
This commit is contained in:
parent
da0acb28ba
commit
06bd1e9347
1 changed files with 14 additions and 1 deletions
|
@ -2,7 +2,14 @@
|
|||
from pexpect_helper import SpawnedProc
|
||||
|
||||
sp = SpawnedProc()
|
||||
send, sendline, sleep, expect_prompt = sp.send, sp.sendline, sp.sleep, sp.expect_prompt
|
||||
send, sendline, sleep, expect_prompt, expect_re, expect_str = (
|
||||
sp.send,
|
||||
sp.sendline,
|
||||
sp.sleep,
|
||||
sp.expect_prompt,
|
||||
sp.expect_re,
|
||||
sp.expect_str,
|
||||
)
|
||||
expect_prompt()
|
||||
|
||||
# Clear twice (regression test for #7280).
|
||||
|
@ -289,3 +296,9 @@ 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("\nb c d")
|
||||
|
||||
# Check that ctrl-z can be bound
|
||||
sendline('bind \cz "echo bound ctrl-z"')
|
||||
expect_prompt()
|
||||
send('\x1A')
|
||||
expect_str("bound ctrl-z")
|
||||
|
|
Loading…
Reference in a new issue