summaryrefslogtreecommitdiff
path: root/tests/redir.tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/redir.tests')
-rw-r--r--tests/redir.tests16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/redir.tests b/tests/redir.tests
index 19cf9a1e..2669cd40 100644
--- a/tests/redir.tests
+++ b/tests/redir.tests
@@ -156,3 +156,19 @@ ${THIS_SH} ./redir5.sub
# test behavior after a write error with a builtin command
${THIS_SH} ./redir6.sub
+
+# problem with redirections using fds bash uses internally
+: ${TMPDIR:=/tmp}
+
+trap 'rm -f $TMPDIR/bash-redir-$$' 0 1 2 3 6 15
+
+echo before block
+{
+ echo before redir
+ exec 10>&1
+ echo after redir
+} > $TMPDIR/bash-redir-$$
+
+echo after block
+
+${THIS_SH} ./redir7.sub