mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08:00
Fix Ctrl-C signals test
Prior to this change, signals.py attempted to generate Ctrl-C (SIGINT) by sending \x03 to stdin. But with the change to use the CSI U sequence, Ctrl-C no longer generates SIGINT. Switch to sending SIGINT directly. Also switch up some of the sleep constants so that a sleep command can't be confused with another one.
This commit is contained in:
parent
9320fb52bb
commit
269b18532d
|
@ -28,18 +28,18 @@ expect_prompt()
|
|||
|
||||
# Verify that SIGINT inside a command sub cancels it.
|
||||
# Negate the pid to send to the pgroup (which should include sleep).
|
||||
sendline("while true; echo (sleep 1000); end")
|
||||
sendline("while true; echo (sleep 2000); end")
|
||||
sleep(0.5)
|
||||
os.kill(-sp.spawn.pid, signal.SIGINT)
|
||||
expect_prompt()
|
||||
|
||||
sendline("sleep 10 &")
|
||||
# SIGINT should be ignored by background processes.
|
||||
sendline("sleep 1234 &")
|
||||
expect_prompt()
|
||||
|
||||
send("\x03")
|
||||
os.kill(-sp.spawn.pid, signal.SIGINT)
|
||||
sleep(0.010)
|
||||
sendline("jobs")
|
||||
expect_prompt("sleep.10")
|
||||
expect_prompt("sleep 1234")
|
||||
sendline("kill %1")
|
||||
expect_prompt()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user