Artifact
090ded8271e9991eb00330713f57ad5930deb45c:
Attachment "test-names.tcl" to
ticket [fdcc860df5]
added by
pointsman
2014-11-13 23:20:57.
(unpublished)
if {[llength $argv] != 2} {
puts stderr "usage: $argv0 testsdir testfile"
exit 1
}
set testsdir [lindex $argv 0]
set testfile [lindex $argv 1]
if {[glob -tails -directory $testsdir $testfile] ne $testfile} {
puts stderr "Unknown test file '$argv'"
exit 1
}
set argv [list]
package require tcltest
proc tcltest::test {name args} {
global testnames
lappend testnames $name
}
set testnames [list]
namespace import -force tcltest::*
set tcltest::testSingleFile false
outputChannel [open /dev/null w+]
source $testsdir/$testfile
puts $testnames