mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Add a simple test for SIGINT out of loops
This commit is contained in:
parent
cc1c973025
commit
ca11b5edc8
2 changed files with 15 additions and 1 deletions
11
tests/checks/sigint.fish
Normal file
11
tests/checks/sigint.fish
Normal file
|
@ -0,0 +1,11 @@
|
|||
#RUN: %fish -C "set helper %fish_test_helper" %s
|
||||
|
||||
# Ensure we can break from a while loop.
|
||||
|
||||
echo About to sigint
|
||||
$helper sigint_parent &
|
||||
while true ; end
|
||||
echo I should not be printed because I got sigint
|
||||
|
||||
#CHECK: About to sigint
|
||||
#CHECKERR: Sent SIGINT to {{\d*}}
|
|
@ -75,7 +75,10 @@ function test_littlecheck_file
|
|||
set -l file $argv[1]
|
||||
echo -n "Testing file $file ... "
|
||||
set starttime (timestamp)
|
||||
$python ../littlecheck.py -s fish=../test/root/bin/fish $file
|
||||
$python ../littlecheck.py \
|
||||
-s fish=../test/root/bin/fish \
|
||||
-s fish_test_helper=../test/root/bin/fish_test_helper \
|
||||
$file
|
||||
set -l exit_status $status
|
||||
set -l res ok
|
||||
set test_duration (delta $starttime)
|
||||
|
|
Loading…
Reference in a new issue