From 020e116c54e61fcd3eea1be5938a6aa03d7c559c Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 6 Jan 2011 20:28:50 +0000 Subject: 28588: fix textual display after =~ test --- ChangeLog | 5 ++++- Src/text.c | 3 +-- Test/C02cond.ztst | 15 +++++++++++++++ 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 + * 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 @@ -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 -- cgit 1.4.1