From: Andreas D. <an...@dr...> - 2009-11-09 20:53:22
|
Andreas, I have some troubles with the semi-bolilerplate code you are using as test harness for the tcllib packages: # -------------------------------------------------------------------- source [file join \ [file dirname [file dirname [file join [pwd] [info script]]]] \ devtools testutilities.tcl] testsNeedTcl 8.2 testsNeedTcltest 1.0 testing { useLocal aes.tcl aes } # -------------------------------------------------------------------- Calling my tests with source <TestFile> fails, since one of the first executed commands of the testutilities.tcl file is 'if {![package vsatisfies [package provide tcltest] 2.0]} {...'. But because the tcltest package is only loaded later with the 'testsNeed'Tcltest' command, 'package provide tcltest' return an empty string and this creates an error with the 'package vsatisfies' command. When I add 'package require tcltest' in front of the semi-bolilerplate code my tests can be executed. But I guess this additional statement should not be required using the correct test launch approach. So, could you tell me how exactly you are launching the test suite for that the Tcltest package is already loaded before the test file is sourced? Thanks! Andreas |