summaryrefslogtreecommitdiffstats
path: root/tests/all.tcl
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-14 05:48:45 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-14 05:48:45 (GMT)
commitf79b432c7c47051e0c7e11bd52e82547ad7aacf2 (patch)
tree506cf7b5383406d4969854b8209566f9c0b690c6 /tests/all.tcl
parent213541e4a3a5a49415c0f9f8d37a5cbce28f89f7 (diff)
downloadtk-f79b432c7c47051e0c7e11bd52e82547ad7aacf2.zip
tk-f79b432c7c47051e0c7e11bd52e82547ad7aacf2.tar.gz
tk-f79b432c7c47051e0c7e11bd52e82547ad7aacf2.tar.bz2
* Completed conversion of Tk test suite to use tcltest.
Diffstat (limited to 'tests/all.tcl')
-rw-r--r--tests/all.tcl62
1 files changed, 7 insertions, 55 deletions
diff --git a/tests/all.tcl b/tests/all.tcl
index f6dee92..dbfe6c6 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -9,59 +9,11 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: all.tcl,v 1.6 2002/04/12 09:18:52 hobbs Exp $
+# RCS: @(#) $Id: all.tcl,v 1.7 2002/07/14 05:48:45 dgp Exp $
-if {[lsearch [namespace children] ::tcltest] == -1} {
- source [file join [pwd] [file dirname [info script]] defs.tcl]
-}
-set ::tcltest::testSingleFile false
-
-puts stdout "Tk $tk_patchLevel tests running in interp: [info nameofexecutable]"
-puts stdout "Tests running in working dir: $::tcltest::workingDir"
-if {[llength $::tcltest::skip] > 0} {
- puts stdout "Skipping tests that match: $::tcltest::skip"
-}
-if {[llength $::tcltest::match] > 0} {
- puts stdout "Only running tests that match: $::tcltest::match"
-}
-
-# Use command line specified glob pattern (specified by -file or -f)
-# if one exists. Otherwise use *.test. If given, the file pattern
-# should be specified relative to the dir containing this file. If no
-# files are found to match the pattern, print an error message and exit.
-set fileIndex [expr {[lsearch $argv "-file"] + 1}]
-set fIndex [expr {[lsearch $argv "-f"] + 1}]
-if {($fileIndex < 1) || ($fIndex > $fileIndex)} {
- set fileIndex $fIndex
-}
-if {$fileIndex > 0} {
- set globPattern [file join $::tcltest::testsDir [lindex $argv $fileIndex]]
- puts stdout "Sourcing files that match: $globPattern"
-} else {
- set globPattern [file join $::tcltest::testsDir *.test]
-}
-set fileList [glob -nocomplain $globPattern]
-if {[llength $fileList] < 1} {
- puts "Error: no files found matching $globPattern"
- exit
-}
-set timeCmd {clock format [clock seconds]}
-puts stdout "Tests began at [eval $timeCmd]"
-
-# source each of the specified tests
-foreach file [lsort $fileList] {
- set tail [file tail $file]
- if {[string match l.*.test $tail]} {
- # This is an SCCS lockfile; ignore it
- continue
- }
- puts stdout $tail
- if {[catch {source $file} msg]} {
- puts stdout $msg
- }
-}
-
-# cleanup
-puts stdout "\nTests ended at [eval $timeCmd]"
-::tcltest::cleanupTests 1
-return
+package require Tcl 8.4
+package require tcltest 2.1
+tcltest::configure -testdir [file join [pwd] [file dirname [info script]]]
+tcltest::configure -singleproc 1
+eval tcltest::configure $argv
+tcltest::runAllTests