Posted to tcl by jnc at Tue Oct 18 13:25:09 GMT 2011view raw
- # FILE: example.test
- package require tcltest
-
- eval ::tcltest::configure $argv
-
- namespace eval ::simpletest {
- namespace import ::tcltest::*
-
- test Test1 {Test 1} {
- return 1
- } 1
-
- test Test2 {Test 2} {
- return 2
- } 2
-
- test Test3 {Test 3} {
- return 3
- } 3
- }
-
- namespace delete ::simpletest
-
- # FILE: test.tcl
- package require tcltest
-
- ::tcltest::configure -testdir \
- [file dirname [file normalize [info script]]]
- eval ::tcltest::configure $argv
- ::tcltest::runAllTests
-
- # CONSOLE OUTPUT
- C:\Development\Projects\tcl_test>tclsh86 test.tcl -verbose p
- Tests running in interp: C:/Development/Tools/Tcl/bin/tclsh86.exe
- Tests located in: C:/Development/Projects/tcl_test
- Tests running in: C:/Development/Projects/tcl_test
- Temporary files stored in C:/Development/Projects/tcl_test
- Test files run in separate interpreters
- Running tests that match: *
- Skipping test files that match: l.*.test
- Only running test files that match: *.test
- Tests began at Tue Oct 18 09:24:59 EDT 2011
- example.test
- ++++ Test1 PASSED
- ++++ Test2 PASSED
- ++++ Test3 PASSED
-
- Tests ended at Tue Oct 18 09:24:59 EDT 2011
- test.tcl: Total 0 Passed 0 Skipped 0 Failed 0
- Sourced 1 Test Files.
Comments
Posted by jnc at Tue Oct 18 13:33:47 GMT 2011 [text] [code]
The problem was I did not call cleanupTests at the bottom of my test file. Adding cleanupTests as the man page states fixes the "problem"