diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-11-09 10:05:10 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-11-10 07:40:04 +1000 |
commit | 87507cd2fc4106bb77a487443ea20abf82a92502 (patch) | |
tree | 1c81018a0a0aae1384dc947c5203d7efbc2291eb /tests/regcount.test | |
parent | c337e92c74561ffa788dcea71cc45dc85da17817 (diff) | |
download | jimtcl-87507cd2fc4106bb77a487443ea20abf82a92502.zip jimtcl-87507cd2fc4106bb77a487443ea20abf82a92502.tar.gz jimtcl-87507cd2fc4106bb77a487443ea20abf82a92502.tar.bz2 |
regex: counts were not all being cleared
If a cached regex containing counts was reused, the result
may have been incorrect.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/regcount.test')
-rw-r--r-- | tests/regcount.test | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regcount.test b/tests/regcount.test index 6b05686..96f4ddd 100644 --- a/tests/regcount.test +++ b/tests/regcount.test @@ -103,4 +103,10 @@ foreach {pat str exp} { test regcount-1.[incr n] "Test: regexp $pat $str" [list regexp -inline -- $pat $str] $exp } +test regcount-2.1 "regexp counts cleared" { + set re "((a|b){1,2}(c{2,3}))" + regexp -inline $re xabcccce + regexp -inline $re xabcccce +} {abccc abccc b ccc} + testreport |