summaryrefslogtreecommitdiffstats
path: root/tests/regexpComp.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2008-08-21 23:19:49 (GMT)
committerhobbs <hobbs>2008-08-21 23:19:49 (GMT)
commitb960e085fa96bdac779fd6c41f343d7bf4d6e4e6 (patch)
treefef1084961ccc38ee1349d3c0e988d15a9450589 /tests/regexpComp.test
parent2b9c55d714bec1b7497dba6f79d2c54f13e9c07a (diff)
downloadtcl-b960e085fa96bdac779fd6c41f343d7bf4d6e4e6.zip
tcl-b960e085fa96bdac779fd6c41f343d7bf4d6e4e6.tar.gz
tcl-b960e085fa96bdac779fd6c41f343d7bf4d6e4e6.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/regexpComp.test')
-rw-r--r--tests/regexpComp.test39
1 files changed, 38 insertions, 1 deletions
diff --git a/tests/regexpComp.test b/tests/regexpComp.test
index 7feaa5f..eeba434 100644
--- a/tests/regexpComp.test
+++ b/tests/regexpComp.test
@@ -43,7 +43,7 @@ test regexpComp-1.2 {basic regexp operation} {
}
} 1
test regexpComp-1.3 {basic regexp operation} {
- evalInProc {
+ evalInProc {
regexp ab*c ab
}
} 0
@@ -69,6 +69,43 @@ test regexpComp-1.7 {regexp utf compliance} {
}
} {0 0}
+test regexp-1.8 {regexp ***= metasyntax} {
+ evalInProc {
+ regexp -- "***=o" "aeiou"
+ }
+} 1
+test regexp-1.9 {regexp ***= metasyntax} {
+ evalInProc {
+ set string "aeiou"
+ regexp -- "***=o" $string
+ }
+} 1
+test regexp-1.10 {regexp ***= metasyntax} {
+ evalInProc {
+ set string "aeiou"
+ set re "***=o"
+ regexp -- $re $string
+ }
+} 1
+test regexp-1.11 {regexp ***= metasyntax} {
+ evalInProc {
+ regexp -- "***=y" "aeiou"
+ }
+} 0
+test regexp-1.12 {regexp ***= metasyntax} {
+ evalInProc {
+ set string "aeiou"
+ regexp -- "***=y" $string
+ }
+} 0
+test regexp-1.13 {regexp ***= metasyntax} {
+ evalInProc {
+ set string "aeiou"
+ set re "***=y"
+ regexp -- $re $string
+ }
+} 0
+
test regexpComp-2.1 {getting substrings back from regexp} {
evalInProc {
set foo {}