summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-01-20 11:16:22 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-01-20 11:16:22 +0000
commitaf68ff74cd5e740d69020ad4ff20f1d5a8dcb4de (patch)
tree4b3232caa414d1717aca990dd7b3588b973ad372 /Test
parent1c71dfd735f34b2b3c7cf8abc3144e763fc96b60 (diff)
downloadzsh-af68ff74cd5e740d69020ad4ff20f1d5a8dcb4de.tar.gz
zsh-af68ff74cd5e740d69020ad4ff20f1d5a8dcb4de.tar.xz
zsh-af68ff74cd5e740d69020ad4ff20f1d5a8dcb4de.zip
27608: fix memory for mbegin, mend & regexp test
Diffstat (limited to 'Test')
-rw-r--r--Test/C02cond.ztst13
1 files changed, 7 insertions, 6 deletions
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index b0e278f4b..a824709d3 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -251,7 +251,7 @@ F:Failures in these cases do not indicate a problem in the shell.
   fi
 0:regex tests shouldn't crash
 
-  if zmodload -i zsh/regex 2>/dev/null; then
+  (if zmodload -i zsh/regex 2>/dev/null; then
     string="this has stuff in it"
     bad_regex=0
     if [[ $string =~ "h([a-z]*) s([a-z]*) " ]]; then
@@ -259,7 +259,7 @@ F:Failures in these cases do not indicate a problem in the shell.
 	print -r "regex variables MATCH MBEGIN MEND:
   '$MATCH $MBEGIN $MEND'
   should be:
-  'has stuff  6 15'" >&2
+  'has stuff  6 15'"
         bad_regex=1
       else
 	results=("as 7 8" "tuff 11 14")
@@ -268,19 +268,20 @@ F:Failures in these cases do not indicate a problem in the shell.
 	    print -r "regex variables match[$i] mbegin[$i] mend[$i]:
   '$match[$i] $mbegin[$i] $mend[$i]'
   should be
-  '$results[$i]'" >&2
+  '$results[$i]'"
+            bad_regex=1
 	    break
 	  fi
 	done
       fi
+      (( bad_regex )) || print OK
     else
-      print -r "regex failed to match '$string'" >&2
+      print -r "regex failed to match '$string'"
     fi
-    (( bad_regex )) || print OK
   else
     # if it didn't load, tough, but not a test error
     print OK
-  fi
+  fi)
 0:MATCH, MBEGIN, MEND, match, mbegin, mend
 >OK