Add test to verify that the fish_postexec handler is called after SIGINT

This commit is contained in:
Norio Nomura 2020-03-03 21:30:53 +09:00 committed by ridiculousfish
parent 4f0fab04ad
commit 60fca97523

View File

@ -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.