summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-01 22:33:20 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-01 22:33:20 (GMT)
commit782734742ecd2e4fdda69f7cff40e27eb51887b6 (patch)
tree7ec5b388f7c0023c717b23a4a1a48b6811dfa1ff /library
parent4079df342780aa4073978137b7bcd7e859f20dd7 (diff)
downloadtcl-782734742ecd2e4fdda69f7cff40e27eb51887b6.zip
tcl-782734742ecd2e4fdda69f7cff40e27eb51887b6.tar.gz
tcl-782734742ecd2e4fdda69f7cff40e27eb51887b6.tar.bz2
* doc/tcltest.n: more work in progress updating tcltest docs.
* library/tcltest/tcltest.tcl: Change [configure -match] to stop treating an empty list as a list of the single pattern "*". Changed the default value to [list *] so default operation remains the same.
Diffstat (limited to 'library')
-rw-r--r--library/tcltest/tcltest.tcl34
1 files changed, 15 insertions, 19 deletions
diff --git a/library/tcltest/tcltest.tcl b/library/tcltest/tcltest.tcl
index 94a12b1..a682a52 100644
--- a/library/tcltest/tcltest.tcl
+++ b/library/tcltest/tcltest.tcl
@@ -16,7 +16,7 @@
# Contributions from Don Porter, NIST, 2002. (not subject to US copyright)
# All rights reserved.
#
-# RCS: @(#) $Id: tcltest.tcl,v 1.63 2002/07/01 14:35:10 dgp Exp $
+# RCS: @(#) $Id: tcltest.tcl,v 1.64 2002/07/01 22:33:20 dgp Exp $
package require Tcl 8.3 ;# uses [glob -directory]
namespace eval tcltest {
@@ -561,7 +561,7 @@ namespace eval tcltest {
# matchFiles, which defaults to all .test files in the
# testsDirectory and matchDirectories, which defaults to all
# directories.
- Option -match {} {
+ Option -match * {
Run all tests within the specified files that match one of the
list of glob patterns given.
} AcceptList match
@@ -2118,21 +2118,19 @@ proc tcltest::RunTest {
}
# skip the test if it's name doesn't match any element of match
- if {[llength [match]] > 0} {
- set ok 0
- foreach pattern [match] {
- if {[string match $pattern $name]} {
- set ok 1
- break
- }
- }
- if {!$ok} {
- if {$testLevel == 1} {
- incr numTests(Skipped)
- DebugDo 1 {AddToSkippedBecause userSpecifiedNonMatch}
- }
- return
+ set ok 0
+ foreach pattern [match] {
+ if {[string match $pattern $name]} {
+ set ok 1
+ break
+ }
+ }
+ if {!$ok} {
+ if {$testLevel == 1} {
+ incr numTests(Skipped)
+ DebugDo 1 {AddToSkippedBecause userSpecifiedNonMatch}
}
+ return
}
DebugPuts 3 "Running $name ($description) {$script}\
@@ -2657,9 +2655,7 @@ proc tcltest::runAllTests { {shell ""} } {
if {[llength [skip]] > 0} {
puts [outputChannel] "Skipping tests that match: [skip]"
}
- if {[llength [match]] > 0} {
- puts [outputChannel] "Only running tests that match: [match]"
- }
+ puts [outputChannel] "Running tests that match: [match]"
if {[llength [skipFiles]] > 0} {
puts [outputChannel] \