about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Src/text.c3
-rw-r--r--Test/C02cond.ztst15
3 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f98e4813..d0fd822d7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-01-06  Peter Stephenson  <p.w.stephenson@ntlworld.com>
 
+	* 28588: Src/text.c, Test/C02cond.ztst: fix textual display
+	after =~ test.
+
 	* Ben: 28574: Completion/Unix/Command/_ri: use bs formatter.
 
 2011-01-06  Barton E. Schaefer  <schaefer@zsh.org>
@@ -14056,5 +14059,5 @@
 
 *****************************************************
 * This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5171 $
+* $Revision: 1.5172 $
 *****************************************************
diff --git a/Src/text.c b/Src/text.c
index e6dd8d7ff..749b5d3dc 100644
--- a/Src/text.c
+++ b/Src/text.c
@@ -785,8 +785,7 @@ gettext2(Estate state)
 			    taddstr(" ");
 			    taddstr(ecgetstr(state, EC_NODUP, NULL));
 			    if (ctype == COND_STREQ ||
-				ctype == COND_STRNEQ ||
-				ctype == COND_REGEX)
+				ctype == COND_STRNEQ)
 				state->pc++;
 			} else {
 			    /* Unary test: `-f foo' etc. */ 
diff --git a/Test/C02cond.ztst b/Test/C02cond.ztst
index 00e22c182..629fdd206 100644
--- a/Test/C02cond.ztst
+++ b/Test/C02cond.ztst
@@ -306,6 +306,21 @@ F:Failures in these cases do not indicate a problem in the shell.
 2:Error message for unknown infix condition
 ?(eval):1: unknown condition: -fail
 
+  crashme() {
+    if [[ $1 =~ ^http:* ]]
+    then
+      url=${1#*=}
+    fi
+  }
+  which crashme
+0:Regression test for examining code with regular expression match
+>crashme () {
+>	if [[ $1 =~ ^http:* ]]
+>	then
+>		url=${1#*=} 
+>	fi
+>}
+
 %clean
   # This works around a bug in rm -f in some versions of Cygwin
   chmod 644 unmodish