From 0a22eb0e0c76892ff0397996f451e9bf78dd3d02 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 11 Jul 2006 15:36:37 +0000 Subject: 22546: fix {myfd}>... bug and tweak tests --- Test/A04redirect.ztst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'Test/A04redirect.ztst') diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst index 06c380bdb..104ed433e 100644 --- a/Test/A04redirect.ztst +++ b/Test/A04redirect.ztst @@ -240,10 +240,15 @@ input + myfd= exec {myfd}>logfile - print This is my logfile. >&$myfd - print Examining contents of logfile... - cat logfile + if [[ -z $myfd ]]; then + print "Ooops, failed to set myfd to a file descriptor." >&2 + else + print This is my logfile. >&$myfd + print Examining contents of logfile... + cat logfile + fi 0:Using {fdvar}> syntax to open a new file descriptor >Examining contents of logfile... >This is my logfile. -- cgit 1.4.1