sh: Add a test for break from a trap action.
This commit is contained in:
parent
c3f0bdc66b
commit
44510b41ff
12
tools/regression/bin/sh/builtins/break2.0
Normal file
12
tools/regression/bin/sh/builtins/break2.0
Normal file
@ -0,0 +1,12 @@
|
||||
# $FreeBSD$
|
||||
|
||||
# It is not immediately obvious that this should work, and someone probably
|
||||
# relies on it.
|
||||
|
||||
while :; do
|
||||
trap 'break' USR1
|
||||
kill -USR1 $$
|
||||
echo bad
|
||||
exit 1
|
||||
done
|
||||
echo good
|
1
tools/regression/bin/sh/builtins/break2.0.stdout
Normal file
1
tools/regression/bin/sh/builtins/break2.0.stdout
Normal file
@ -0,0 +1 @@
|
||||
good
|
Loading…
Reference in New Issue
Block a user