summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test28
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