File: all.tcl

package info (click to toggle)
tktable 2.7-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 928 kB
  • ctags: 644
  • sloc: ansic: 8,027; tcl: 987; makefile: 251; sh: 152
file content (61 lines) | stat: -rw-r--r-- 1,940 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# all.tcl --
#
# This file contains a top-level script to run all of the Tk table
# tests.  Execute it by invoking "source all.tcl" when running tktest
# in this directory.
#
# Copyright (c) 1998-2000 Ajuba Solutions
# Copyright (c) 2000 Jeffrey Hobbs
#
# See the file "license.txt" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
# 
# RCS: @(#) $Id: all.tcl,v 1.1 2000/10/19 18:29:28 hobbs Exp $

package require tcltest
namespace import -force ::tcltest::*

set ::tcltest::testSingleFile false
set ::tcltest::testsDirectory [file dir [info script]]

# We need to ensure that the testsDirectory is absolute
catch {::tcltest::normalizePath ::tcltest::testsDirectory}

puts $::tcltest::outputChannel \
	"Tk $tk_patchLevel tests running in interp:  [info nameofexecutable]"
puts $::tcltest::outputChannel \
	"Tests running in working dir:  $::tcltest::testsDirectory"
if {[llength $::tcltest::skip] > 0} {
    puts $::tcltest::outputChannel \
	    "Skipping tests that match:  $::tcltest::skip"
}
if {[llength $::tcltest::match] > 0} {
    puts $::tcltest::outputChannel \
	    "Only running tests that match:  $::tcltest::match"
}

if {[llength $::tcltest::skipFiles] > 0} {
    puts $::tcltest::outputChannel \
	    "Skipping test files that match:  $::tcltest::skipFiles"
}
if {[llength $::tcltest::matchFiles] > 0} {
    puts $::tcltest::outputChannel \
	    "Only sourcing test files that match:  $::tcltest::matchFiles"
}

set timeCmd {clock format [clock seconds]}
puts $::tcltest::outputChannel "Tests began at [eval $timeCmd]"

# source each of the specified tests
foreach file [lsort [::tcltest::getMatchingFiles]] {
    set tail [file tail $file]
    puts $::tcltest::outputChannel $tail
    if {[catch {source $file} msg]} {
	puts $::tcltest::outputChannel $msg
    }
}

# cleanup
puts $::tcltest::outputChannel "\nTests ended at [eval $timeCmd]"
::tcltest::cleanupTests 1
exit