From c88084895d2b00f242082f47cbd5d3feef058eed Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 1 Dec 2011 14:22:55 +0000 Subject: 29923: work around test problem with invalid file descriptor message --- Test/A04redirect.ztst | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'Test') diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst index e58102664..838cb196d 100644 --- a/Test/A04redirect.ztst +++ b/Test/A04redirect.ztst @@ -153,17 +153,31 @@ >goodbye (exec 3<&- - read foo <&-) -1:'<&-' redirection -?(eval):1: failed to close file descriptor 3: bad file descriptor + read foo <&-) 2>errmsg1.txt + mystat=$? + (( $mystat == 1 )) || print "Unexpected error status $mystat" >&2 + input=("${(f)$(&2 + fi +0:'<&-' redirection print foo >&- 0:'>&-' redirection (exec >&- - print foo) + print foo) 2>errmsg2.txt + mystat=$? + (( $mystat == 0 )) || print "Unexpected error status $mystat" >&2 + input=("${(f)$(&2 + fi 0:'>&-' with attempt to use closed fd -?(eval):2: write error: bad file descriptor fn() { local foo; read foo; print $foo; } coproc fn -- cgit 1.4.1