mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 01:04:10 +08:00
Add test to verify that the fish_postexec handler is called after SIGINT
This commit is contained in:
parent
4f0fab04ad
commit
60fca97523
@ -5,6 +5,14 @@
|
||||
set pid [spawn $fish]
|
||||
expect_prompt
|
||||
|
||||
# Verify that the fish_postexec handler is called after SIGINT.
|
||||
send_line "function postexec --on-event fish_postexec; echo fish_postexec spotted; end"
|
||||
expect_prompt
|
||||
send_line read
|
||||
expect -re "\\r\\n?read> $"
|
||||
exec -- kill -INT $pid
|
||||
expect "fish_postexec spotted"
|
||||
|
||||
# Verify that sending SIGHUP to the shell, such as will happen when the tty is
|
||||
# closed by the terminal, terminates the shell and the foreground command and
|
||||
# any background commands run from that shell.
|
||||
|
Loading…
x
Reference in New Issue
Block a user