summaryrefslogtreecommitdiffstats
path: root/tests/reg.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-11-03 00:34:51 (GMT)
committerhobbs <hobbs>2006-11-03 00:34:51 (GMT)
commitc399e676c8dbdec3ce1fe4b694d7c269f9b1f675 (patch)
tree13086bc5f8998596d202f1bdeaa9df4ed46bc3cd /tests/reg.test
parentee75480f2f9483654c8f665acd984569f3234ca8 (diff)
downloadtcl-c399e676c8dbdec3ce1fe4b694d7c269f9b1f675.zip
tcl-c399e676c8dbdec3ce1fe4b694d7c269f9b1f675.tar.gz
tcl-c399e676c8dbdec3ce1fe4b694d7c269f9b1f675.tar.bz2
* doc/ParseCmd.3, doc/Tcl.n, doc/eval.n, doc/exec.n:
* doc/fconfigure.n, doc/interp.n, doc/unknown.n: * library/auto.tcl, library/init.tcl, library/package.tcl: * library/safe.tcl, library/tm.tcl, library/msgcat/msgcat.tcl: * tests/all.tcl, tests/basic.test, tests/cmdInfo.test: * tests/compile.test, tests/encoding.test, tests/execute.test: * tests/fCmd.test, tests/http.test, tests/init.test: * tests/interp.test, tests/io.test, tests/ioUtil.test: * tests/iogt.test, tests/namespace-old.test, tests/namespace.test: * tests/parse.test, tests/pkg.test, tests/pkgMkIndex.test: * tests/proc.test, tests/reg.test, tests/trace.test: * tests/upvar.test, tests/winConsole.test, tests/winFCmd.test: * tools/tclZIC.tcl: * generic/tclParse.c (Tcl_ParseCommand): Replace {expand} with {*} officially (TIP #293). Leave -DALLOW_EXPAND=0|1 option to keep {expand} syntax for transition users. [Bug 1589629]
Diffstat (limited to 'tests/reg.test')
-rw-r--r--tests/reg.test28
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/reg.test b/tests/reg.test
index 37536ce..40b8766 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.22 2004/11/05 15:15:25 dkf Exp $
+# RCS: @(#) $Id: reg.test,v 1.23 2006/11/03 00:34:53 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -187,8 +187,8 @@ namespace eval RETest {
# if &, test as both BRE and ARE
if {[string match *&* $flags]} {
set f [string map {& {}} $flags]
- MatchExpected $opts "$testid ARE" ${f} $re $target {expand}$args
- MatchExpected $opts "$testid BRE" ${f}b $re $target {expand}$args
+ MatchExpected $opts "$testid ARE" ${f} $re $target {*}$args
+ MatchExpected $opts "$testid BRE" ${f}b $re $target {*}$args
return
}
@@ -207,8 +207,8 @@ namespace eval RETest {
set f [TestFlags $flags]
set infoflags [TestInfoFlags $flags]
- set ccmd [list testregexp -about {expand}$f $re]
- set ecmd [list testregexp {expand}$opts {expand}$f $re $target]
+ set ccmd [list testregexp -about {*}$f $re]
+ set ecmd [list testregexp {*}$opts {*}$f $re $target]
set nsub [expr {[llength $args] - 1}]
set names [list]
@@ -230,7 +230,7 @@ namespace eval RETest {
incr nsub -1 ;# the extra does not count
}
set erun "list \[[concat $ecmd $names]\] $refs"
- set result [list [expr {![string match *!* $flags]}] {expand}$args]
+ set result [list [expr {![string match *!* $flags]}] {*}$args]
set info [list $nsub $infoflags]
::tcltest::test [TestNum $testid compile] [TestDesc $testid compile] \
@@ -262,7 +262,7 @@ namespace eval RETest {
lappend constraints localeRegexp
}
- set cmd [list testregexp -about {expand}[TestFlags $flags] $re]
+ set cmd [list testregexp -about {*}[TestFlags $flags] $re]
::tcltest::test [TestNum $testid error] [TestDesc $testid error] \
-constraints $constraints -result [list 1 REG_$err] -body \
"list \[catch \{$cmd\}\] \[lindex \$::errorCode 1\]"
@@ -273,8 +273,8 @@ namespace eval RETest {
# if &, test as both ARE and BRE
if {[string match *&* $flags]} {
set f [string map {& {}} $flags]
- expectNomatch "$testid ARE" ${f} $re $target {expand}$args
- expectNomatch "$testid BRE" ${f}b $re $target {expand}$args
+ expectNomatch "$testid ARE" ${f} $re $target {*}$args
+ expectNomatch "$testid BRE" ${f}b $re $target {*}$args
return
}
@@ -288,7 +288,7 @@ namespace eval RETest {
set f [TestFlags $flags]
set infoflags [TestInfoFlags $flags]
- set ccmd [list testregexp -about {expand}$f $re]
+ set ccmd [list testregexp -about {*}$f $re]
set nsub [expr {[llength $args] - 1}]
if {$nsub == -1} {
# didn't tell us number of subexps
@@ -297,7 +297,7 @@ namespace eval RETest {
} else {
set info [list $nsub $infoflags]
}
- set ecmd [list testregexp {expand}$f $re $target]
+ set ecmd [list testregexp {*}$f $re $target]
::tcltest::test [TestNum $testid compile] [TestDesc $testid compile] \
-constraints $constraints -body $ccmd -result $info
@@ -308,13 +308,13 @@ namespace eval RETest {
# match expected (no missing, empty, or ambiguous submatches)
# expectMatch testno flags re target mat submat ...
proc expectMatch {args} {
- MatchExpected {} {expand}$args
+ MatchExpected {} {*}$args
}
# match expected (full fanciness)
# expectIndices testno flags re target mat submat ...
proc expectIndices {args} {
- MatchExpected -indices {expand}$args
+ MatchExpected -indices {*}$args
}
# partial match expected
@@ -322,7 +322,7 @@ namespace eval RETest {
# Quirk: number of ""s must be one more than number of subREs.
proc expectPartial {args} {
lset args 1 ![lindex $args 1] ;# add ! flag
- MatchExpected -indices {expand}$args
+ MatchExpected -indices {*}$args
}
# test is a knownBug