summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>2000-09-20 01:50:37 (GMT)
committerericm <ericm@noemail.net>2000-09-20 01:50:37 (GMT)
commit96af005e0610a42493f435964fbff6b6141c9f96 (patch)
tree898c1d7c089fbde4ddba5e1439c89644c8372642 /tests/regexp.test
parent4908bc4d91222a72e791a6c43fb40100b44b0c31 (diff)
downloadtcl-96af005e0610a42493f435964fbff6b6141c9f96.zip
tcl-96af005e0610a42493f435964fbff6b6141c9f96.tar.gz
tcl-96af005e0610a42493f435964fbff6b6141c9f96.tar.bz2
* generic/tclCmdMZ.c (Tcl_RegexpObjCmd): When using -all, all
attempts after the first to match the regexp against the string should include the TCL_REG_NOTBOL flag, to avoid erroneously matching ^ in the middle of the string. Added code to set this flag after the first pass through the matching loop. [Bug: 6284]. FossilOrigin-Name: 9c141af9b52fb6038a2a4bfa2d38319e72b54c45
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index e891b54..63dbd31 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: regexp.test,v 1.13 2000/04/10 21:08:27 ericm Exp $
+# RCS: @(#) $Id: regexp.test,v 1.14 2000/09/20 01:50:39 ericm Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -526,6 +526,10 @@ test regexp-18.10 {regexp -all} {
# Go to index 3; this is past the end of the string, so stop.
regexp -all -inline {a*} aba
} {a {} a}
+test regexp-18.11 {regexp -all} {
+ regexp -all -inline {^a} aaaa
+} {a}
+
# cleanup
::tcltest::cleanupTests