diff --git a/Makefile.am b/Makefile.am index a4e5a1f..34853ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 \ diff --git a/tests/43-trap-subshell.sh b/tests/43-trap-subshell.sh new file mode 100644 index 0000000..dc8eb21 --- /dev/null +++ b/tests/43-trap-subshell.sh @@ -0,0 +1,5 @@ +trap "rm /tmp/bar$$" 0 +echo foo > /tmp/bar$$ +cat /tmp/bar$$ +(exit 0) +cat /tmp/bar$$ diff --git a/tests/43-trap-subshell.stdout b/tests/43-trap-subshell.stdout new file mode 100644 index 0000000..0d55bed --- /dev/null +++ b/tests/43-trap-subshell.stdout @@ -0,0 +1,2 @@ +foo +foo