mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
Add a test for COMPLETE_AUTO_SPACE
Improves our test coverage a bit.
This commit is contained in:
parent
8ff07d46c2
commit
52cfb66cf7
1 changed files with 22 additions and 1 deletions
|
@ -2,15 +2,36 @@
|
|||
from pexpect_helper import SpawnedProc
|
||||
|
||||
sp = SpawnedProc()
|
||||
send, sendline, sleep, expect_prompt, expect_re = (
|
||||
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()
|
||||
|
||||
# Verify COMPLETE_AUTO_SPACE behavior
|
||||
sendline("complete -x -c monster -a truck")
|
||||
expect_prompt()
|
||||
sendline("complete -x -c monster -a energy=")
|
||||
expect_prompt()
|
||||
send("monster t")
|
||||
sleep(0.1)
|
||||
send("\t")
|
||||
sleep(0.1)
|
||||
send("!")
|
||||
expect_str("monster truck !") # space
|
||||
send("\b" * 64)
|
||||
send("monster e")
|
||||
sleep(0.1)
|
||||
send("\t")
|
||||
sleep(0.1)
|
||||
send("!")
|
||||
expect_str("monster energy=!") # no space
|
||||
send("\b" * 64)
|
||||
|
||||
sendline(
|
||||
"""
|
||||
# Make sure this function does nothing
|
||||
|
|
Loading…
Reference in a new issue