.
Index: library/dde/pkgIndex.tcl
==================================================================
--- library/dde/pkgIndex.tcl
+++ library/dde/pkgIndex.tcl
@@ -3,5 +3,9 @@
if {[::tcl::pkgconfig get debug]} {
package ifneeded dde 1.4.0b1 [list load [file join $dir tcldde14g.dll] dde]
} else {
package ifneeded dde 1.4.0b1 [list load [file join $dir tcldde14.dll] dde]
}
+if { [info exists ::ddelib] } {
+ # ::ddelib is required by windde.test
+ set ::ddelib [lindex [package ifneeded dde 1.4.0b1] 1]
+}
Index: library/reg/pkgIndex.tcl
==================================================================
--- library/reg/pkgIndex.tcl
+++ library/reg/pkgIndex.tcl
@@ -5,5 +5,9 @@
[list load [file join $dir tclreg13g.dll] registry]
} else {
package ifneeded registry 1.3.0 \
[list load [file join $dir tclreg13.dll] registry]
}
+if { [info exists ::reglib] } {
+ # ::reglib is required by clock.test, fCmd.test and registry.test
+ set ::reglib [lindex [package ifneeded dde 1.4.0b1] 1]
+}
Index: tests/clock.test
==================================================================
--- tests/clock.test
+++ tests/clock.test
@@ -15,16 +15,13 @@
package require tcltest 2
namespace import -force ::tcltest::*
}
if {[testConstraint win]} {
- if {[catch {package require registry 1.1}]
- && [catch {load {} Registry}]
- && [catch {
- ::tcltest::loadTestedCommands
- load $::reglib Registry
- }]} {
+ if { (0 != [catch { load {} Registry; set ::reglib {} }])
+ && (0 != [catch { ::tcltest::loadTestedCommands; load $::reglib Registry }])
+ && (0 != [catch { set ::reglib {}; package require registry 1.1 }]) } {
namespace eval ::tcl::clock {variable NoRegistry {}}
}
}
package require msgcat 1.4
Index: tests/fCmd.test
==================================================================
--- tests/fCmd.test
+++ tests/fCmd.test
@@ -23,20 +23,13 @@
testConstraint win2000orXP 0
# Don't know how to determine this constraint correctly
testConstraint notNetworkFilesystem 0
testConstraint reg 0
if {[testConstraint win]} {
- catch {
- # Is the registry extension already static to this shell?
- try {
- load {} Registry
- set ::reglib {}
- } on error {} {
- # try the location given to use on the commandline to tcltest
- ::tcltest::loadTestedCommands
- load $::reglib Registry
- }
+ if { (0 == [catch { load {} Registry; set ::reglib {} }])
+ || (0 == [catch { ::tcltest::loadTestedCommands; load $::reglib Registry }])
+ || (0 == [catch { set ::reglib {}; package require registry }]) } {
testConstraint reg 1
}
}
set tmpspace /tmp;# default value
Index: tests/registry.test
==================================================================
--- tests/registry.test
+++ tests/registry.test
@@ -15,17 +15,13 @@
namespace import -force ::tcltest::*
}
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
- ::tcltest::loadTestedCommands
- load $::reglib Registry
- }
+ if { (0 == [catch { load {} Registry; set ::reglib {} }])
+ || (0 == [catch { ::tcltest::loadTestedCommands; load $::reglib Registry }])
+ || (0 == [catch { set ::reglib {}; package require registry }]) } {
testConstraint reg 1
}
}
# determine the current locale
@@ -503,11 +499,11 @@
registry set HKEY_CURRENT_USER\\TclFoobar val1 {foo ba\u0000r baz} multi_sz
set result [registry get HKEY_CURRENT_USER\\TclFoobar val1]
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
set result
} [string repeat x 16383]
Index: tests/winDde.test
==================================================================
--- tests/winDde.test
+++ tests/winDde.test
@@ -13,20 +13,15 @@
package require tcltest 2
#tcltest::configure -verbose {pass start}
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 1
-}] {
- testConstraint dde 0
+testConstraint dde 0
+if { (0 == [catch { load {} Dde; set ::ddelib {} }])
+ || (0 == [catch { ::tcltest::loadTestedCommands; load $::ddelib Dde }])
+ || (0 == [catch { set ::ddelib {}; package require dde }]) } {
+ testConstraint dde 1
}
# -------------------------------------------------------------------------
# Setup a script for a test server