diff options
author | dgp <dgp@noemail.net> | 2003-11-17 17:48:15 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2003-11-17 17:48:15 (GMT) |
commit | 3892b6b8725922dca397530b94169ea9d96347d7 (patch) | |
tree | 156ce5016704b4b547f14beb2b489ac0d52bda1f /tests/reg.test | |
parent | 8cc19070cbac1d921e269e1e202c0f0fe4980c52 (diff) | |
download | tcl-3892b6b8725922dca397530b94169ea9d96347d7.zip tcl-3892b6b8725922dca397530b94169ea9d96347d7.tar.gz tcl-3892b6b8725922dca397530b94169ea9d96347d7.tar.bz2 |
* tests/reg.test: Added tests for [Bugs 230589, 504785, 505048, 840258]
recently fixed by 2003-11-15 commit to regcomp.c by Pavel Goran.
FossilOrigin-Name: ef520e12a5609d8e349a2e2c03feab5f617f41d9
Diffstat (limited to 'tests/reg.test')
-rw-r--r-- | tests/reg.test | 49 |
1 files changed, 48 insertions, 1 deletions
diff --git a/tests/reg.test b/tests/reg.test index bbcb2d1..5b08112 100644 --- a/tests/reg.test +++ b/tests/reg.test @@ -9,7 +9,7 @@ # # Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. # -# RCS: @(#) $Id: reg.test,v 1.19 2003/11/14 20:44:47 dgp Exp $ +# RCS: @(#) $Id: reg.test,v 1.20 2003/11/17 17:48:17 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -1083,6 +1083,53 @@ test reg-32.9 {canmatch functionality -- more complex case} {knownBug} { lappend res $resvar } {0 6} +# Tests reg-33.*: Checks for bug fixes + +test reg-33.1 {Bug 230589} { + regexp {[ ]*(^|[^%])%V} "*%V2" m s +} 1 + +test reg-33.2 {Bug 504785} { + regexp -inline {([^_.]*)([^.]*)\.(..)(.).*} bbcos_001_c01.q1la +} {bbcos_001_c01.q1la bbcos _001_c01 q1 l} + +test reg-33.3 {Bug 505048} { + regexp {\A\s*[^<]*\s*<([^>]+)>} a<a> +} 1 + +test reg-33.4 {Bug 505048} { + regexp {\A\s*([^b]*)b} ab +} 1 + +test reg-33.5 {Bug 505048} { + regexp {\A\s*[^b]*(b)} ab +} 1 + +test reg-33.6 {Bug 505048} { + regexp {\A(\s*)[^b]*(b)} ab +} 1 + +test reg-33.7 {Bug 505048} { + regexp {\A\s*[^b]*b} ab +} 1 + +test reg-33.8 {Bug 505048} { + regexp -inline {\A\s*[^b]*b} ab +} ab + +test reg-33.9 {Bug 505048} { + regexp -indices -inline {\A\s*[^b]*b} ab +} {{0 1}} + +test reg-33.10 {Bug 840258} { + regsub {(^|\n)+\.*b} \n.b {} tmp +} 1 + +test reg-33.11 {Bug 840258} { + regsub {(^|[\n\r]+)\.*\?<.*?(\n|\r)+} \ + "TQ\r\n.?<5000267>Test already stopped\r\n" {} tmp +} 1 + # cleanup ::tcltest::cleanupTests return |