tests: Add 43-trap-subshell.sh.

* tests/43-trap-subshell.sh: New file.
* tests/43-trap-subshell.stdout: New file.
* Makefile.am (FULL_TESTS): Add tests/43-trap-subshell.sh.
This commit is contained in:
Jan Nieuwenhuizen 2019-01-01 22:01:05 +01:00 committed by Timothy Sample
parent bbb74ab958
commit 06099ddead
3 changed files with 8 additions and 0 deletions

View File

@ -205,6 +205,7 @@ FULL_TESTS = \
tests/42-sh-export.sh \
tests/42-export-new.sh \
tests/42-sh-export-new.sh \
tests/43-trap-subshell.sh \
tests/50-iohere.sh \
tests/50-iohere-builtin.sh \
tests/50-redirect.sh \

View File

@ -0,0 +1,5 @@
trap "rm /tmp/bar$$" 0
echo foo > /tmp/bar$$
cat /tmp/bar$$
(exit 0)
cat /tmp/bar$$

View File

@ -0,0 +1,2 @@
foo
foo