summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorkrischan <krischan>2002-12-24 22:13:55 (GMT)
committerkrischan <krischan>2002-12-24 22:13:55 (GMT)
commitbd8007fd65c5f25b9fedc44b61107e0999d0e951 (patch)
tree7dc54cf1ca9ed666482a2e117412a63d3549b755 /tests
parent2fe40f45dce426943d696b733fd4a6c739101bdf (diff)
downloadtktreectrl-bd8007fd65c5f25b9fedc44b61107e0999d0e951.zip
tktreectrl-bd8007fd65c5f25b9fedc44b61107e0999d0e951.tar.gz
tktreectrl-bd8007fd65c5f25b9fedc44b61107e0999d0e951.tar.bz2
Driver file for test-suite of treectrl (copy from Tcl's test-suite).
Diffstat (limited to 'tests')
-rwxr-xr-xtests/all.tcl58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/all.tcl b/tests/all.tcl
new file mode 100755
index 0000000..c005514
--- /dev/null
+++ b/tests/all.tcl
@@ -0,0 +1,58 @@
+# all.tcl --
+#
+# This file contains a top-level script to run all of the Tcl
+# tests. Execute it by invoking "source all.test" when running tcltest
+# in this directory.
+#
+# Copyright (c) 1998-2000 by Scriptics Corporation.
+# All rights reserved.
+#
+# RCS: @(#) $Id: all.tcl,v 1.1 2002/12/24 22:13:55 krischan Exp $
+
+if {[lsearch [namespace children] ::tcltest] == -1} {
+ package require tcltest
+ namespace import ::tcltest::*
+}
+
+set ::tcltest::testSingleFile false
+set ::tcltest::testsDirectory [file dir [info script]]
+
+# We need to ensure that the testsDirectory is absolute
+::tcltest::normalizePath ::tcltest::testsDirectory
+
+set chan $::tcltest::outputChannel
+
+puts $chan "Tests running in interp: [info nameofexecutable]"
+puts $chan "Tests running with pwd: [pwd]"
+puts $chan "Tests running in working dir: $::tcltest::testsDirectory"
+if {[llength $::tcltest::skip] > 0} {
+ puts $chan "Skipping tests that match: $::tcltest::skip"
+}
+if {[llength $::tcltest::match] > 0} {
+ puts $chan "Only running tests that match: $::tcltest::match"
+}
+
+if {[llength $::tcltest::skipFiles] > 0} {
+ puts $chan "Skipping test files that match: $::tcltest::skipFiles"
+}
+if {[llength $::tcltest::matchFiles] > 0} {
+ puts $chan "Only sourcing test files that match: $::tcltest::matchFiles"
+}
+
+set timeCmd {clock format [clock seconds]}
+puts $chan "Tests began at [eval $timeCmd]"
+
+# source each of the specified tests
+foreach file [lsort [::tcltest::getMatchingFiles]] {
+ set tail [file tail $file]
+ puts $chan $tail
+ if {[catch {source $file} msg]} {
+ puts $chan $msg
+ }
+}
+
+# cleanup
+puts $chan "\nTests ended at [eval $timeCmd]"
+::tcltest::cleanupTests 1
+return
+