diff options
| author | hobbs <hobbs> | 2008-08-21 23:19:49 (GMT) |
|---|---|---|
| committer | hobbs <hobbs> | 2008-08-21 23:19:49 (GMT) |
| commit | 90d0e87e10492e16c9845dc2a8211814375a9ab1 (patch) | |
| tree | fef1084961ccc38ee1349d3c0e988d15a9450589 /tests/regexp.test | |
| parent | b5861937fa996a33ec1d26f9ac6886237df74c6a (diff) | |
| download | tcl-90d0e87e10492e16c9845dc2a8211814375a9ab1.zip tcl-90d0e87e10492e16c9845dc2a8211814375a9ab1.tar.gz tcl-90d0e87e10492e16c9845dc2a8211814375a9ab1.tar.bz2 | |
* tests/regexp.test, tests/regexpComp.test: correct re2glob ***=
* generic/tclUtil.c (TclReToGlob): translation from exact
to anywhere-in-string match. [Bug 2065115]
Diffstat (limited to 'tests/regexp.test')
| -rw-r--r-- | tests/regexp.test | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/tests/regexp.test b/tests/regexp.test index 5b0f886..c4b4cab 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.32 2008/07/21 22:22:28 nijtmans Exp $ +# RCS: @(#) $Id: regexp.test,v 1.33 2008/08/21 23:19:51 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -44,6 +44,31 @@ test regexp-1.7 {regexp utf compliance} { list [string compare $foo $bar] [regexp 4 $bar] } {0 0} +test regexp-1.8 {regexp ***= metasyntax} { + regexp -- "***=o" "aeiou" +} 1 +test regexp-1.9 {regexp ***= metasyntax} { + set string "aeiou" + regexp -- "***=o" $string +} 1 +test regexp-1.10 {regexp ***= metasyntax} { + set string "aeiou" + set re "***=o" + regexp -- $re $string +} 1 +test regexp-1.11 {regexp ***= metasyntax} { + regexp -- "***=y" "aeiou" +} 0 +test regexp-1.12 {regexp ***= metasyntax} { + set string "aeiou" + regexp -- "***=y" $string +} 0 +test regexp-1.13 {regexp ***= metasyntax} { + set string "aeiou" + set re "***=y" + regexp -- $re $string +} 0 + test regexp-2.1 {getting substrings back from regexp} { set foo {} list [regexp ab*c abbbbc foo] $foo |
