Add a simple test for SIGINT out of loops

This commit is contained in:
ridiculousfish 2019-10-15 22:33:53 -07:00
parent cc1c973025
commit ca11b5edc8
2 changed files with 15 additions and 1 deletions

11
tests/checks/sigint.fish Normal file
View 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*}}

View file

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