about summary refs log tree commit diff
path: root/Test/A04redirect.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2011-12-01 21:52:55 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2011-12-01 21:52:55 +0000
commitae8e3ba86d675e13d70e9bf26bf88620bebb096d (patch)
treeaac40ec0598eab326572422461342bb997578a34 /Test/A04redirect.ztst
parentd6d0297b10fb1ad4143633140414f8c5631016d6 (diff)
downloadzsh-ae8e3ba86d675e13d70e9bf26bf88620bebb096d.tar.gz
zsh-ae8e3ba86d675e13d70e9bf26bf88620bebb096d.tar.xz
zsh-ae8e3ba86d675e13d70e9bf26bf88620bebb096d.zip
29924: add ability to match test output using patterns
Diffstat (limited to 'Test/A04redirect.ztst')
-rw-r--r--Test/A04redirect.ztst24
1 files changed, 5 insertions, 19 deletions
diff --git a/Test/A04redirect.ztst b/Test/A04redirect.ztst
index 838cb196d..888a0d480 100644
--- a/Test/A04redirect.ztst
+++ b/Test/A04redirect.ztst
@@ -153,31 +153,17 @@
 >goodbye
 
   (exec 3<&-
-  read foo <&-) 2>errmsg1.txt
-  mystat=$?
-  (( $mystat == 1 )) || print "Unexpected error status $mystat" >&2
-  input=("${(f)$(<errmsg1.txt)}")
-  if [[ ${#input} != 1 || \
-        $input[1] !=   "(eval):1: failed to close file descriptor 3:"* ]];
-  then
-    print "Unexpected error output:\n$input" >&2
-  fi
-0:'<&-' redirection
+  read foo <&-)
+1:'<&-' redirection
+*?\(eval\):1: failed to close file descriptor 3:*
 
   print foo >&-
 0:'>&-' redirection
 
   (exec >&-
-  print foo) 2>errmsg2.txt
-  mystat=$?
-  (( $mystat == 0 )) || print "Unexpected error status $mystat" >&2
-  input=("${(f)$(<errmsg2.txt)}")
-  if [[ ${#input} != 1 || \
-        $input[1] !=   "(eval):2: write error:"* ]];
-  then
-    print "Unexpected error output:\n$input" >&2
-  fi
+  print foo)
 0:'>&-' with attempt to use closed fd
+*?\(eval\):2: write error:*
 
   fn() { local foo; read foo; print $foo; }
   coproc fn