summaryrefslogtreecommitdiffstats
path: root/tests/vredir8.sub
diff options
context:
space:
mode:
Diffstat (limited to 'tests/vredir8.sub')
-rw-r--r--tests/vredir8.sub13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/vredir8.sub b/tests/vredir8.sub
new file mode 100644
index 0000000..e87b45b
--- /dev/null
+++ b/tests/vredir8.sub
@@ -0,0 +1,13 @@
+# test varredir_close
+
+: {fd}<>/dev/null
+
+echo redir 1 >&$fd
+exec {fd}>&-
+
+shopt -s varredir_close
+
+: {fd}<>/dev/tty
+
+echo redir 2 >&$fd
+exec {fd}>&-