summaryrefslogtreecommitdiffstats
path: root/Test/A04redirect.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-07-11 15:36:37 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-07-11 15:36:37 +0000
commit0a22eb0e0c76892ff0397996f451e9bf78dd3d02 (patch)
treede3f0518d47f18071ce95735736b3036010a49d5 /Test/A04redirect.ztst
parent22544: Improve use of ztype tests for multibyte characters. Add (diff)
downloadzsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.tar
zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.tar.gz
zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.tar.bz2
zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.tar.lz
zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.tar.xz
zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.tar.zst
zsh-0a22eb0e0c76892ff0397996f451e9bf78dd3d02.zip
22546: fix {myfd}>... bug and tweak tests
Diffstat (limited to 'Test/A04redirect.ztst')
-rw-r--r--Test/A04redirect.ztst11
1 files changed, 8 insertions, 3 deletions
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
>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.