diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-28 14:52:43 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-07-28 14:52:43 (GMT) |
commit | fac7c80aed10356b5116daca1d8b8a160aa1d18d (patch) | |
tree | 7c8d977863510bf506b626330a9aaf1f87a2daf5 /tests/winDde.test | |
parent | 511869919b8096663ea9389b87afc807627fd9e4 (diff) | |
download | tcl-fac7c80aed10356b5116daca1d8b8a160aa1d18d.zip tcl-fac7c80aed10356b5116daca1d8b8a160aa1d18d.tar.gz tcl-fac7c80aed10356b5116daca1d8b8a160aa1d18d.tar.bz2 |
[Bug 3549770] Multiple test failures running tcltest outside build tree
Diffstat (limited to 'tests/winDde.test')
-rw-r--r-- | tests/winDde.test | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/tests/winDde.test b/tests/winDde.test index 9c777c3..b684394 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -15,17 +15,16 @@ if {[lsearch [namespace children] ::tcltest] == -1} { namespace import -force ::tcltest::* } +testConstraint dde 0 if {[testConstraint win]} { - 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 + if {![catch {load {} Dde; set ::ddelib {}}] + || ![catch { + package require dde + set ::ddelib [lindex [package ifneeded dde 1.3.3] 1]}] + || ![catch { ::tcltest::loadTestedCommands - load $::ddelib Dde - } + load $::ddelib Dde}]} { testConstraint dde 1 - }] { - testConstraint dde 0 } } @@ -41,8 +40,10 @@ proc createChildProcess { ddeServerName {handler {}}} { set f [open $::scriptName w+] puts $f [list set ddeServerName $ddeServerName] - if {$::ddelib != ""} { + if {[info exists ::ddelib]} { puts $f [list load $::ddelib Dde] + } else { + puts $f [list package require dde] } puts $f { # DDE child server - |