From 772f20abb0a3a0979c440114bf3a1cff5b3cef03 Mon Sep 17 00:00:00 2001 From: cvpcs Date: Wed, 2 Jun 2010 11:02:31 -0500 Subject: initial import of bash 4.1 --- tests/vredir.right | 88 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 tests/vredir.right (limited to 'tests/vredir.right') diff --git a/tests/vredir.right b/tests/vredir.right new file mode 100644 index 0000000..0e3b24b --- /dev/null +++ b/tests/vredir.right @@ -0,0 +1,88 @@ +10 +foo 1 +foo 2 +foo 3 +bar is a function +bar () +{ + exec {v}> $TMPFILE; + echo $v +} +./vredir.tests: line 6: v: readonly variable +./vredir.tests: line 6: v: cannot assign fd to variable +42 +./vredir.tests: line 25: $v: Bad file descriptor +./vredir.tests: line 26: $v: Bad file descriptor +./vredir.tests: line 27: $v: Bad file descriptor +bar is a function +bar () +{ + exec {v}> $TMPFILE; + echo $v +} +11 +line 1 +line 2 +line 3 +bar is a function +bar () +{ + exec {v}<&- +} +iclosev is a function +iclosev () +{ + exec {v}>&- +} +/bin/bash +/bin/csh +/bin/ksh +/bin/sh +/bin/tcsh +/bin/zsh +./vredir3.sub: line 4: v: ambiguous redirect +after +11 12 +a +a +swizzle is a function +swizzle () +{ + fd0=0; + fd1=1; + exec {stdin}<&$fd0; + exec {stdout}>&$fd1 +} +13 11 +a +a +swizzle is a function +swizzle () +{ + exec {fd0}<&0; + exec {fd1}>&1; + exec {stdin}<&$fd0-; + exec {stdout}>&$fd1- +} -- cgit v1.1