summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/clock.test6
-rw-r--r--tests/registry.test6
-rw-r--r--tests/winDde.test17
3 files changed, 9 insertions, 20 deletions
diff --git a/tests/clock.test b/tests/clock.test
index 5db6273..fea1fc9 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -17,11 +17,9 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
}
if {[testConstraint win]} {
- if {[catch {load {} Registry}]
- && [catch {package require registry}]
- && [catch {
+ if {[catch {
::tcltest::loadTestedCommands
- load $::reglib Registry
+ package require registry
}]} {
namespace eval ::tcl::clock {variable NoRegistry {}}
}
diff --git a/tests/registry.test b/tests/registry.test
index cda914f..cbca4fd 100644
--- a/tests/registry.test
+++ b/tests/registry.test
@@ -17,11 +17,9 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
testConstraint reg 0
if {[testConstraint win]} {
- if {![catch {load {} Registry}]
- || ![catch {package require registry}]
- || ![catch {
+ if {![catch {
::tcltest::loadTestedCommands
- load $::reglib Registry
+ package require registry
}]} {
testConstraint reg 1
}
diff --git a/tests/winDde.test b/tests/winDde.test
index b684394..f0ef56c 100644
--- a/tests/winDde.test
+++ b/tests/winDde.test
@@ -17,13 +17,10 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
testConstraint dde 0
if {[testConstraint win]} {
- if {![catch {load {} Dde; set ::ddelib {}}]
- || ![catch {
- package require dde
- set ::ddelib [lindex [package ifneeded dde 1.3.3] 1]}]
- || ![catch {
+ if {![catch {
::tcltest::loadTestedCommands
- load $::ddelib Dde}]} {
+ package require dde
+ set ::ddelib [lindex [package ifneeded dde 1.3.3] 1]}]} {
testConstraint dde 1
}
}
@@ -35,16 +32,12 @@ if {[testConstraint win]} {
set scriptName [makeFile {} script1.tcl]
-proc createChildProcess { ddeServerName {handler {}}} {
+proc createChildProcess {ddeServerName {handler {}}} {
file delete -force $::scriptName
set f [open $::scriptName w+]
puts $f [list set ddeServerName $ddeServerName]
- if {[info exists ::ddelib]} {
- puts $f [list load $::ddelib Dde]
- } else {
- puts $f [list package require dde]
- }
+ puts $f [list load $::ddelib dde]
puts $f {
# DDE child server -
#