summaryrefslogtreecommitdiffstats
path: root/tests/reg.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reg.test')
-rw-r--r--tests/reg.test5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/reg.test b/tests/reg.test
index 2ee1048..847da32 100644
--- a/tests/reg.test
+++ b/tests/reg.test
@@ -10,7 +10,8 @@
# Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
if {"::tcltest" ni [namespace children]} {
- package require tcltest 2
+ package require tcltest 2.5
+ namespace import -force ::tcltest::*
}
::tcltest::loadTestedCommands
@@ -287,7 +288,7 @@ namespace eval RETest {
set infoflags [TestInfoFlags $flags]
set ccmd [list testregexp -about {*}$f $re]
set nsub [expr {[llength $args] - 1}]
- if {$nsub == -1} {
+ if {$nsub < 0} {
# didn't tell us number of subexps
set ccmd "lreplace \[$ccmd\] 0 0"
set info [list $infoflags]