summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-30 15:13:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2012-07-30 15:13:36 (GMT)
commit87982ab2fe141bd44b9d9173f28a0d85e6f54d57 (patch)
tree937d0083d35614908c768b0cede6686768d89564 /tests
parentffdffbb7b2d35e999050978c6f79e90c7021ea76 (diff)
downloadtcl-87982ab2fe141bd44b9d9173f28a0d85e6f54d57.zip
tcl-87982ab2fe141bd44b9d9173f28a0d85e6f54d57.tar.gz
tcl-87982ab2fe141bd44b9d9173f28a0d85e6f54d57.tar.bz2
fix event-tests running with tcltest86.dll
Diffstat (limited to 'tests')
-rw-r--r--tests/event.test13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/event.test b/tests/event.test
index 6da43a5..8ab239d 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -12,8 +12,12 @@
package require tcltest 2
namespace import -force ::tcltest::*
-::tcltest::loadTestedCommands
-catch [list package require -exact Tcltest [info patchlevel]]
+catch {
+ ::tcltest::loadTestedCommands
+ package require -exact Tcltest [info patchlevel]
+ set ::tcltestlib [lindex [package ifneeded Tcltest [info patchlevel]] 1]
+}
+
testConstraint testfilehandler [llength [info commands testfilehandler]]
testConstraint testexithandler [llength [info commands testexithandler]]
@@ -430,6 +434,7 @@ catch {rename bgerror {}}
test event-8.1 {Tcl_CreateExitHandler procedure} {stdio testexithandler} {
set child [open |[list [interpreter]] r+]
+ puts $child "load $::tcltestlib Tcltest"
puts $child "testexithandler create 41; testexithandler create 4"
puts $child "testexithandler create 6; exit"
flush $child
@@ -443,6 +448,7 @@ odd 41
test event-9.1 {Tcl_DeleteExitHandler procedure} {stdio testexithandler} {
set child [open |[list [interpreter]] r+]
+ puts $child "load $::tcltestlib Tcltest"
puts $child "testexithandler create 41; testexithandler create 4"
puts $child "testexithandler create 6; testexithandler delete 41"
puts $child "testexithandler create 16; exit"
@@ -456,6 +462,7 @@ even 4
}
test event-9.2 {Tcl_DeleteExitHandler procedure} {stdio testexithandler} {
set child [open |[list [interpreter]] r+]
+ puts $child "load $::tcltestlib Tcltest"
puts $child "testexithandler create 41; testexithandler create 4"
puts $child "testexithandler create 6; testexithandler delete 4"
puts $child "testexithandler create 16; exit"
@@ -469,6 +476,7 @@ odd 41
}
test event-9.3 {Tcl_DeleteExitHandler procedure} {stdio testexithandler} {
set child [open |[list [interpreter]] r+]
+ puts $child "load $::tcltestlib Tcltest"
puts $child "testexithandler create 41; testexithandler create 4"
puts $child "testexithandler create 6; testexithandler delete 6"
puts $child "testexithandler create 16; exit"
@@ -482,6 +490,7 @@ odd 41
}
test event-9.4 {Tcl_DeleteExitHandler procedure} {stdio testexithandler} {
set child [open |[list [interpreter]] r+]
+ puts $child "load $::tcltestlib Tcltest"
puts $child "testexithandler create 41; testexithandler delete 41"
puts $child "testexithandler create 16; exit"
flush $child