Posted to tcl by de at Wed Feb 27 21:38:25 GMT 2013view raw
- 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