diff options
Diffstat (limited to 'bin/sh/tests/builtins/trap10.0')
-rw-r--r-- | bin/sh/tests/builtins/trap10.0 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/bin/sh/tests/builtins/trap10.0 b/bin/sh/tests/builtins/trap10.0 new file mode 100644 index 0000000..fa0e35d --- /dev/null +++ b/bin/sh/tests/builtins/trap10.0 @@ -0,0 +1,6 @@ +# $FreeBSD$ + +# Check that the return statement will not break the EXIT trap, ie. all +# trap commands are executed before the script exits. + +test "$(trap 'printf trap; echo ped' EXIT; f() { return; }; f)" = trapped || exit 1 |