diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/clock.test | 6 | ||||
-rw-r--r-- | tests/registry.test | 11 | ||||
-rw-r--r-- | tests/winDde.test | 20 |
3 files changed, 14 insertions, 23 deletions
diff --git a/tests/clock.test b/tests/clock.test index fd74512..0202fc7 100644 --- a/tests/clock.test +++ b/tests/clock.test @@ -17,11 +17,9 @@ if {[lsearch [namespace children] ::tcltest] == -1} { } if {[testConstraint win]} { - if {[catch {package require registry 1.1}] - && [catch {load {} 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 400277f..71d1fad 100644 --- a/tests/registry.test +++ b/tests/registry.test @@ -17,13 +17,10 @@ if {[lsearch [namespace children] ::tcltest] == -1} { testConstraint reg 0 if {[testConstraint win]} { - catch { - # Is the registry extension already static to this shell? - if [catch {load {} Registry; set ::reglib {}}] { - # try the location given to use on the commandline to tcltest + if {![catch { ::tcltest::loadTestedCommands - load $::reglib Registry - } + package require registry + }]} { testConstraint reg 1 } } @@ -505,7 +502,7 @@ test registry-6.20 {GetValue: values with Unicode strings with embedded nulls} { registry delete HKEY_CURRENT_USER\\TclFoobar set result } "foo ba r baz" -test registry-6.21 {GetValue: very long value names and values} {pcOnly} { +test registry-6.21 {GetValue: very long value names and values} {pcOnly reg} { registry set HKEY_CURRENT_USER\\TclFoobar [string repeat k 16383] [string repeat x 16383] multi_sz set result [registry get HKEY_CURRENT_USER\\TclFoobar [string repeat k 16383]] registry delete HKEY_CURRENT_USER\\TclFoobar diff --git a/tests/winDde.test b/tests/winDde.test index 83f3598..b73f665 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -15,16 +15,14 @@ if {"::tcltest" ni [namespace children]} { namespace import -force ::tcltest::* } -if [catch { - # Is the dde extension already static to this shell? - if [catch {load {} Dde; set ::ddelib {}}] { - # try the location given to use on the commandline to tcltest - ::tcltest::loadTestedCommands - load $::ddelib Dde +testConstraint dde 0 +if {[testConstraint win]} { + if {![catch { + ::tcltest::loadTestedCommands + package require dde 1.4.0b1 + set ::ddelib [lindex [package ifneeded dde 1.4.0b1] 1]}]} { + testConstraint dde 1 } - testConstraint dde 1 -}] { - testConstraint dde 0 } @@ -39,9 +37,7 @@ proc createChildProcess {ddeServerName args} { set f [open $::scriptName w+] puts $f [list set ddeServerName $ddeServerName] - if {$::ddelib != ""} { - puts $f [list load $::ddelib Dde] - } + puts $f [list load $::ddelib dde] puts $f { # DDE child server - # |