diff options
author | stanton <stanton> | 1999-05-13 01:50:31 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-05-13 01:50:31 (GMT) |
commit | 9525d9226567d4bcd1134ce0376e04dbe531bf6f (patch) | |
tree | 2ed4e906d3b8d7624d3d173ae41938257d15e24f /tests | |
parent | 1fcc7feac69c4ccee7495f17ab908e53e09c4e0e (diff) | |
download | tcl-9525d9226567d4bcd1134ce0376e04dbe531bf6f.zip tcl-9525d9226567d4bcd1134ce0376e04dbe531bf6f.tar.gz tcl-9525d9226567d4bcd1134ce0376e04dbe531bf6f.tar.bz2 |
* tests/regexp.test:
* generic/tclInt.h:
* generic/tclBasic.c:
* generic/tclRegexp.h:
* generic/tclRegexp.c: Replaced the per-interpreter regexp cache
with a per-thread cache. Changed the Regexp object to take
advantage of this extra cache. Added a reference count to the
TclRegexp type so regexps can be shared by multiple objects.
Removed the per-interp regexp cache from the interpreter. Now
regexps can be used with no need for an interpreter. [Bug: 1063]
Diffstat (limited to 'tests')
-rw-r--r-- | tests/regexp.test | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/regexp.test b/tests/regexp.test index 611a780..d1e58cd 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.3 1999/04/16 00:47:33 stanton Exp $ +# RCS: @(#) $Id: regexp.test,v 1.4 1999/05/13 01:50:33 stanton Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -361,6 +361,32 @@ test regexp-12.1 {regsub of a very large string} { set x done } {done} +test regexp-13.1 {CompileRegexp: regexp cache} { + regexp .*a b + regexp .*b c + regexp .*c d + regexp .*d e + regexp .*e f + set x . + append x *a + regexp $x bbba +} 1 +test regexp-13.2 {CompileRegexp: regexp cache, different flags} { + regexp .*a b + regexp .*b c + regexp .*c d + regexp .*d e + regexp .*e f + set x . + append x *a + regexp -nocase $x bbba +} 1 + +set x 1 +set y 2 +regexp "$x$y" 123 + + # cleanup ::tcltest::cleanupTests return |