summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--tests/registry.test229
-rw-r--r--tests/winDde.test63
-rw-r--r--win/Makefile.in8
-rw-r--r--win/makefile.vc12
-rw-r--r--win/tclWinThrd.c5
6 files changed, 170 insertions, 155 deletions
diff --git a/ChangeLog b/ChangeLog
index aa2b621..5c65936 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,14 @@
TclpObjStat, TclpObjAccess,
TclpOpenFileChannel
+ * tests/registry.test: Fixed test files to load the correct
+ * tests/winDde.test: registry and dde packages by using the info
+ * win/Makefile.in: from makefiles to tell tcltest where to load
+ * win/makefile.vc: them from. This avoids grabbing the wrong
+ package from $auto_path which might be the install point rather than
+ the dev location. Kudos to Jennifer Hom for adding -load and
+ -loadfile to the tcltest package. [Bug 926088]
+
2004-10-27 Andreas Kupries <andreask@activestate.com>
* tests/tm.test: Expanded on the testsuite entered by Donal.
diff --git a/tests/registry.test b/tests/registry.test
index 0621b69..9d475e7 100644
--- a/tests/registry.test
+++ b/tests/registry.test
@@ -10,7 +10,7 @@
# Copyright (c) 1997 by Sun Microsystems, Inc. All rights reserved.
# Copyright (c) 1998-1999 by Scriptics Corporation.
#
-# RCS: @(#) $Id: registry.test,v 1.17 2004/06/23 15:36:58 dkf Exp $
+# RCS: @(#) $Id: registry.test,v 1.18 2004/10/27 20:53:37 davygrvy Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -19,12 +19,15 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
if {$tcl_platform(platform) == "windows"} {
if [catch {
- set lib [lindex [glob -directory [file join [pwd] [file dirname \
- [info nameofexecutable]]] tclreg*.dll] 0]
- load $lib registry
+ # 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
+ }
+ ::tcltest::testConstraint reg 1
}] {
- puts "Unable to find the registry package. Skipping registry tests."
- return
+ ::tcltest::testConstraint reg 0
}
}
@@ -35,119 +38,119 @@ testConstraint english [expr {[llength [info commands testlocale]]
set hostname [info hostname]
-test registry-1.1 {argument parsing for registry command} {win} {
+test registry-1.1 {argument parsing for registry command} {win reg} {
list [catch {registry} msg] $msg
} {1 {wrong # args: should be "registry option ?arg arg ...?"}}
-test registry-1.2 {argument parsing for registry command} {win} {
+test registry-1.2 {argument parsing for registry command} {win reg} {
list [catch {registry foo} msg] $msg
} {1 {bad option "foo": must be broadcast, delete, get, keys, set, type, or values}}
-test registry-1.3 {argument parsing for registry command} {win} {
+test registry-1.3 {argument parsing for registry command} {win reg} {
list [catch {registry d} msg] $msg
} {1 {wrong # args: should be "registry delete keyName ?valueName?"}}
-test registry-1.4 {argument parsing for registry command} {win} {
+test registry-1.4 {argument parsing for registry command} {win reg} {
list [catch {registry delete} msg] $msg
} {1 {wrong # args: should be "registry delete keyName ?valueName?"}}
-test registry-1.5 {argument parsing for registry command} {win} {
+test registry-1.5 {argument parsing for registry command} {win reg} {
list [catch {registry delete foo bar baz} msg] $msg
} {1 {wrong # args: should be "registry delete keyName ?valueName?"}}
-test registry-1.6 {argument parsing for registry command} {win} {
+test registry-1.6 {argument parsing for registry command} {win reg} {
list [catch {registry g} msg] $msg
} {1 {wrong # args: should be "registry get keyName valueName"}}
-test registry-1.7 {argument parsing for registry command} {win} {
+test registry-1.7 {argument parsing for registry command} {win reg} {
list [catch {registry get} msg] $msg
} {1 {wrong # args: should be "registry get keyName valueName"}}
-test registry-1.8 {argument parsing for registry command} {win} {
+test registry-1.8 {argument parsing for registry command} {win reg} {
list [catch {registry get foo} msg] $msg
} {1 {wrong # args: should be "registry get keyName valueName"}}
-test registry-1.9 {argument parsing for registry command} {win} {
+test registry-1.9 {argument parsing for registry command} {win reg} {
list [catch {registry get foo bar baz} msg] $msg
} {1 {wrong # args: should be "registry get keyName valueName"}}
-test registry-1.10 {argument parsing for registry command} {win} {
+test registry-1.10 {argument parsing for registry command} {win reg} {
list [catch {registry k} msg] $msg
} {1 {wrong # args: should be "registry keys keyName ?pattern?"}}
-test registry-1.11 {argument parsing for registry command} {win} {
+test registry-1.11 {argument parsing for registry command} {win reg} {
list [catch {registry keys} msg] $msg
} {1 {wrong # args: should be "registry keys keyName ?pattern?"}}
-test registry-1.12 {argument parsing for registry command} {win} {
+test registry-1.12 {argument parsing for registry command} {win reg} {
list [catch {registry keys foo bar baz} msg] $msg
} {1 {wrong # args: should be "registry keys keyName ?pattern?"}}
-test registry-1.13 {argument parsing for registry command} {win} {
+test registry-1.13 {argument parsing for registry command} {win reg} {
list [catch {registry s} msg] $msg
} {1 {wrong # args: should be "registry set keyName ?valueName data ?type??"}}
-test registry-1.14 {argument parsing for registry command} {win} {
+test registry-1.14 {argument parsing for registry command} {win reg} {
list [catch {registry set} msg] $msg
} {1 {wrong # args: should be "registry set keyName ?valueName data ?type??"}}
-test registry-1.15 {argument parsing for registry command} {win} {
+test registry-1.15 {argument parsing for registry command} {win reg} {
list [catch {registry set foo bar} msg] $msg
} {1 {wrong # args: should be "registry set keyName ?valueName data ?type??"}}
-test registry-1.16 {argument parsing for registry command} {win} {
+test registry-1.16 {argument parsing for registry command} {win reg} {
list [catch {registry set foo bar baz blat gorp} msg] $msg
} {1 {wrong # args: should be "registry set keyName ?valueName data ?type??"}}
-test registry-1.17 {argument parsing for registry command} {win} {
+test registry-1.17 {argument parsing for registry command} {win reg} {
list [catch {registry t} msg] $msg
} {1 {wrong # args: should be "registry type keyName valueName"}}
-test registry-1.18 {argument parsing for registry command} {win} {
+test registry-1.18 {argument parsing for registry command} {win reg} {
list [catch {registry type} msg] $msg
} {1 {wrong # args: should be "registry type keyName valueName"}}
-test registry-1.19 {argument parsing for registry command} {win} {
+test registry-1.19 {argument parsing for registry command} {win reg} {
list [catch {registry type foo} msg] $msg
} {1 {wrong # args: should be "registry type keyName valueName"}}
-test registry-1.20 {argument parsing for registry command} {win} {
+test registry-1.20 {argument parsing for registry command} {win reg} {
list [catch {registry type foo bar baz} msg] $msg
} {1 {wrong # args: should be "registry type keyName valueName"}}
-test registry-1.21 {argument parsing for registry command} {win} {
+test registry-1.21 {argument parsing for registry command} {win reg} {
list [catch {registry v} msg] $msg
} {1 {wrong # args: should be "registry values keyName ?pattern?"}}
-test registry-1.22 {argument parsing for registry command} {win} {
+test registry-1.22 {argument parsing for registry command} {win reg} {
list [catch {registry values} msg] $msg
} {1 {wrong # args: should be "registry values keyName ?pattern?"}}
-test registry-1.23 {argument parsing for registry command} {win} {
+test registry-1.23 {argument parsing for registry command} {win reg} {
list [catch {registry values foo bar baz} msg] $msg
} {1 {wrong # args: should be "registry values keyName ?pattern?"}}
-test registry-2.1 {DeleteKey: bad key} {win} {
+test registry-2.1 {DeleteKey: bad key} {win reg} {
list [catch {registry delete foo} msg] $msg
} {1 {bad root name "foo": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}}
-test registry-2.2 {DeleteKey: bad key} {win} {
+test registry-2.2 {DeleteKey: bad key} {win reg} {
list [catch {registry delete HKEY_CLASSES_ROOT} msg] $msg
} {1 {bad key: cannot delete root keys}}
-test registry-2.3 {DeleteKey: bad key} {win} {
+test registry-2.3 {DeleteKey: bad key} {win reg} {
list [catch {registry delete HKEY_CLASSES_ROOT\\} msg] $msg
} {1 {bad key: cannot delete root keys}}
-test registry-2.4 {DeleteKey: subkey at root level} {win} {
+test registry-2.4 {DeleteKey: subkey at root level} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry keys HKEY_CLASSES_ROOT TclFoobar
} {}
-test registry-2.5 {DeleteKey: subkey below root level} {win} {
+test registry-2.5 {DeleteKey: subkey below root level} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test
registry delete HKEY_CLASSES_ROOT\\TclFoobar\\test
set result [registry keys HKEY_CLASSES_ROOT TclFoobar\\test]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {}
-test registry-2.6 {DeleteKey: recursive delete} {win} {
+test registry-2.6 {DeleteKey: recursive delete} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result [registry keys HKEY_CLASSES_ROOT TclFoobar]
set result
} {}
-test registry-2.7 {DeleteKey: trailing backslashes} {win english} {
+test registry-2.7 {DeleteKey: trailing backslashes} {win reg english} {
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz
list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar\\} msg] $msg
} {1 {unable to delete key: The configuration registry key is invalid.}}
-test registry-2.8 {DeleteKey: failure} {win} {
+test registry-2.8 {DeleteKey: failure} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry delete HKEY_CLASSES_ROOT\\TclFoobar
} {}
-test registry-2.9 {DeleteKey: unicode} {win} {
+test registry-2.9 {DeleteKey: unicode} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test\u00c7bar\\a
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test\u00c7bar\\b
@@ -157,7 +160,7 @@ test registry-2.9 {DeleteKey: unicode} {win} {
set result
} {}
-test registry-3.1 {DeleteValue} {win} {
+test registry-3.1 {DeleteValue} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test1 blort
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test2 blat
@@ -166,18 +169,18 @@ test registry-3.1 {DeleteValue} {win} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} test2
-test registry-3.2 {DeleteValue: bad key} {win english} {
+test registry-3.2 {DeleteValue: bad key} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar test} msg] $msg
} {1 {unable to open key: The system cannot find the file specified.}}
-test registry-3.3 {DeleteValue: bad value} {win english} {
+test registry-3.3 {DeleteValue: bad value} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz test2 blort
set result [list [catch {registry delete HKEY_CLASSES_ROOT\\TclFoobar test1} msg] $msg]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {1 {unable to delete value "test1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}}
-test registry-3.4 {DeleteValue: Unicode} {win} {
+test registry-3.4 {DeleteValue: Unicode} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz \u00c7test1 blort
registry set HKEY_CLASSES_ROOT\\TclFoobar\\\u00c7baz test2 blat
@@ -187,31 +190,31 @@ test registry-3.4 {DeleteValue: Unicode} {win} {
set result
} test2
-test registry-4.1 {GetKeyNames: bad key} {win english} {
+test registry-4.1 {GetKeyNames: bad key} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg
} {1 {unable to open key: The system cannot find the file specified.}}
-test registry-4.2 {GetKeyNames} {win} {
+test registry-4.2 {GetKeyNames} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz
set result [registry keys HKEY_CLASSES_ROOT\\TclFoobar]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {baz}
-test registry-4.3 {GetKeyNames: remote key} {win nonPortable english} {
+test registry-4.3 {GetKeyNames: remote key} {win reg nonPortable english} {
registry set \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar\\baz
set result [registry keys \\\\gaspode\\HKEY_CLASSES_ROOT\\TclFoobar]
registry delete \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar
set result
} {baz}
-test registry-4.4 {GetKeyNames: empty key} {win} {
+test registry-4.4 {GetKeyNames: empty key} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar
set result [registry keys HKEY_CLASSES_ROOT\\TclFoobar]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {}
-test registry-4.5 {GetKeyNames: patterns} {win} {
+test registry-4.5 {GetKeyNames: patterns} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz
registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat
@@ -220,7 +223,7 @@ test registry-4.5 {GetKeyNames: patterns} {win} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {baz blat}
-test registry-4.6 {GetKeyNames: names with spaces} {win} {
+test registry-4.6 {GetKeyNames: names with spaces} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\ bar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat
@@ -229,7 +232,7 @@ test registry-4.6 {GetKeyNames: names with spaces} {win} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {{baz bar} blat}
-test registry-4.7 {GetKeyNames: Unicode} {win english} {
+test registry-4.7 {GetKeyNames: Unicode} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\u00c7bar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat
@@ -238,7 +241,7 @@ test registry-4.7 {GetKeyNames: Unicode} {win english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} "baz\u00c7bar blat"
-test registry-4.8 {GetKeyNames: Unicode} {win nt} {
+test registry-4.8 {GetKeyNames: Unicode} {win reg nt} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz\u30b7bar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\blat
@@ -248,217 +251,217 @@ test registry-4.8 {GetKeyNames: Unicode} {win nt} {
set result
} "baz\u30b7bar blat"
-test registry-5.1 {GetType} {win english} {
+test registry-5.1 {GetType} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
list [catch {registry type HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg
} {1 {unable to open key: The system cannot find the file specified.}}
-test registry-5.2 {GetType} {win english} {
+test registry-5.2 {GetType} {win reg english} {
registry set HKEY_CLASSES_ROOT\\TclFoobar
list [catch {registry type HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg
} {1 {unable to get type of value "val1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}}
-test registry-5.3 {GetType} {win} {
+test registry-5.3 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar none
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} none
-test registry-5.4 {GetType} {win} {
+test registry-5.4 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} sz
-test registry-5.5 {GetType} {win} {
+test registry-5.5 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar sz
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} sz
-test registry-5.6 {GetType} {win} {
+test registry-5.6 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar expand_sz
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} expand_sz
-test registry-5.7 {GetType} {win} {
+test registry-5.7 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 binary
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} binary
-test registry-5.8 {GetType} {win} {
+test registry-5.8 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 dword
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} dword
-test registry-5.9 {GetType} {win} {
+test registry-5.9 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 dword_big_endian
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} dword_big_endian
-test registry-5.10 {GetType} {win} {
+test registry-5.10 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 link
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} link
-test registry-5.11 {GetType} {win} {
+test registry-5.11 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar multi_sz
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} multi_sz
-test registry-5.12 {GetType} {win} {
+test registry-5.12 {GetType} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 resource_list
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} resource_list
-test registry-5.13 {GetType: unknown types} {win} {
+test registry-5.13 {GetType: unknown types} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 24
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} 24
-test registry-5.14 {GetType: Unicode} {win} {
+test registry-5.14 {GetType: Unicode} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar va\u00c7l1 1 24
set result [registry type HKEY_CLASSES_ROOT\\TclFoobar va\u00c7l1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} 24
-test registry-6.1 {GetValue} {win english} {
+test registry-6.1 {GetValue} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
list [catch {registry get HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg
} {1 {unable to open key: The system cannot find the file specified.}}
-test registry-6.2 {GetValue} {win english} {
+test registry-6.2 {GetValue} {win reg english} {
registry set HKEY_CLASSES_ROOT\\TclFoobar
list [catch {registry get HKEY_CLASSES_ROOT\\TclFoobar val1} msg] $msg
} {1 {unable to get value "val1" from key "HKEY_CLASSES_ROOT\TclFoobar": The system cannot find the file specified.}}
-test registry-6.3 {GetValue} {win} {
+test registry-6.3 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar none
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} foobar
-test registry-6.4 {GetValue} {win} {
+test registry-6.4 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} foobar
-test registry-6.5 {GetValue} {win} {
+test registry-6.5 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} foobar
-test registry-6.6 {GetValue} {win} {
+test registry-6.6 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar expand_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} foobar
-test registry-6.7 {GetValue} {win} {
+test registry-6.7 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 binary
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} 1
-test registry-6.8 {GetValue} {win} {
+test registry-6.8 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 0x20 dword
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} 32
-test registry-6.9 {GetValue} {win} {
+test registry-6.9 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 0x20 dword_big_endian
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} 32
-test registry-6.10 {GetValue} {win} {
+test registry-6.10 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 link
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} 1
-test registry-6.11 {GetValue} {win} {
+test registry-6.11 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 foobar multi_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} foobar
-test registry-6.12 {GetValue} {win} {
+test registry-6.12 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo\ bar baz} multi_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {{foo bar} baz}
-test registry-6.13 {GetValue} {win} {
+test registry-6.13 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {} multi_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {}
test registry-6.14 {GetValue: truncation of multivalues with null elements} \
- {win} {
+ {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {a {} b} multi_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} a
-test registry-6.15 {GetValue} {win} {
+test registry-6.15 {GetValue} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 resource_list
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} 1
-test registry-6.16 {GetValue: unknown types} {win} {
+test registry-6.16 {GetValue: unknown types} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 1 24
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} 1
-test registry-6.17 {GetValue: Unicode value names} {win} {
+test registry-6.17 {GetValue: Unicode value names} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val\u00c71 foobar multi_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val\u00c71]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} foobar
-test registry-6.18 {GetValue: values with Unicode strings} {win nt} {
+test registry-6.18 {GetValue: values with Unicode strings} {win reg nt} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u30b7r baz} multi_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} "foo ba\u30b7r baz"
-test registry-6.19 {GetValue: values with Unicode strings} {win english} {
+test registry-6.19 {GetValue: values with Unicode strings} {win reg english} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u00c7r baz} multi_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} "foo ba\u00c7r baz"
-test registry-6.20 {GetValue: values with Unicode strings with embedded nulls} {win} {
+test registry-6.20 {GetValue: values with Unicode strings with embedded nulls} {win reg} {
registry set HKEY_CLASSES_ROOT\\TclFoobar val1 {foo ba\u0000r baz} multi_sz
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar val1]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} "foo ba r baz"
-test registry-7.1 {GetValueNames: bad key} {win english} {
+test registry-7.1 {GetValueNames: bad key} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
list [catch {registry values HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg
} {1 {unable to open key: The system cannot find the file specified.}}
-test registry-7.2 {GetValueNames} {win} {
+test registry-7.2 {GetValueNames} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar
set result [registry values HKEY_CLASSES_ROOT\\TclFoobar]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} baz
-test registry-7.3 {GetValueNames} {win} {
+test registry-7.3 {GetValueNames} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar1
registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2
@@ -467,20 +470,20 @@ test registry-7.3 {GetValueNames} {win} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {{} baz blat}
-test registry-7.4 {GetValueNames: remote key} {win nonPortable english} {
+test registry-7.4 {GetValueNames: remote key} {win reg nonPortable english} {
registry set \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar baz blat
set result [registry values \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar]
registry delete \\\\$hostname\\HKEY_CLASSES_ROOT\\TclFoobar
set result
} baz
-test registry-7.5 {GetValueNames: empty key} {win} {
+test registry-7.5 {GetValueNames: empty key} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar
set result [registry values HKEY_CLASSES_ROOT\\TclFoobar]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {}
-test registry-7.6 {GetValueNames: patterns} {win} {
+test registry-7.6 {GetValueNames: patterns} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar baz foobar1
registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2
@@ -489,7 +492,7 @@ test registry-7.6 {GetValueNames: patterns} {win} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} {baz blat}
-test registry-7.7 {GetValueNames: names with spaces} {win} {
+test registry-7.7 {GetValueNames: names with spaces} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar baz\ bar foobar1
registry set HKEY_CLASSES_ROOT\\TclFoobar blat foobar2
@@ -499,52 +502,52 @@ test registry-7.7 {GetValueNames: names with spaces} {win} {
set result
} {{baz bar} blat}
-test registry-8.1 {OpenSubKey} {win nonPortable english} {
+test registry-8.1 {OpenSubKey} {win reg nonPortable english} {
# This test will only succeed if the current user does not have registry
# access on the specified machine.
list [catch {registry keys {\\mom\HKEY_LOCAL_MACHINE}} msg] $msg
} {1 {unable to open key: Access is denied.}}
-test registry-8.2 {OpenSubKey} {win} {
+test registry-8.2 {OpenSubKey} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar
set result [registry keys HKEY_CLASSES_ROOT TclFoobar]
registry delete HKEY_CLASSES_ROOT\\TclFoobar
set result
} TclFoobar
-test registry-8.3 {OpenSubKey} {win english} {
+test registry-8.3 {OpenSubKey} {win reg english} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar} msg] $msg
} {1 {unable to open key: The system cannot find the file specified.}}
-test registry-9.1 {ParseKeyName: bad keys} {win} {
+test registry-9.1 {ParseKeyName: bad keys} {win reg} {
list [catch {registry values \\} msg] $msg
} "1 {bad key \"\\\": must start with a valid root}"
-test registry-9.2 {ParseKeyName: bad keys} {win} {
+test registry-9.2 {ParseKeyName: bad keys} {win reg} {
list [catch {registry values \\foobar} msg] $msg
} {1 {bad key "\foobar": must start with a valid root}}
-test registry-9.3 {ParseKeyName: bad keys} {win} {
+test registry-9.3 {ParseKeyName: bad keys} {win reg} {
list [catch {registry values \\\\} msg] $msg
} {1 {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}}
-test registry-9.4 {ParseKeyName: bad keys} {win} {
+test registry-9.4 {ParseKeyName: bad keys} {win reg} {
list [catch {registry values \\\\\\} msg] $msg
} {1 {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}}
-test registry-9.5 {ParseKeyName: bad keys} {win english nt} {
+test registry-9.5 {ParseKeyName: bad keys} {win reg english nt} {
list [catch {registry values \\\\\\HKEY_CLASSES_ROOT} msg] $msg
} {1 {unable to open key: The network address is invalid.}}
-test registry-9.6 {ParseKeyName: bad keys} {win} {
+test registry-9.6 {ParseKeyName: bad keys} {win reg} {
list [catch {registry values \\\\gaspode} msg] $msg
} {1 {bad root name "": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}}
-test registry-9.7 {ParseKeyName: bad keys} {win} {
+test registry-9.7 {ParseKeyName: bad keys} {win reg} {
list [catch {registry values foobar} msg] $msg
} {1 {bad root name "foobar": must be HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_CURRENT_CONFIG, HKEY_PERFORMANCE_DATA, or HKEY_DYN_DATA}}
-test registry-9.8 {ParseKeyName: null keys} {win} {
+test registry-9.8 {ParseKeyName: null keys} {win reg} {
list [catch {registry delete HKEY_CLASSES_ROOT\\} msg] $msg
} {1 {bad key: cannot delete root keys}}
-test registry-9.9 {ParseKeyName: null keys} {win english} {
+test registry-9.9 {ParseKeyName: null keys} {win reg english} {
list [catch {registry keys HKEY_CLASSES_ROOT\\TclFoobar\\baz} msg] $msg
} {1 {unable to open key: The system cannot find the file specified.}}
-test registry-10.1 {RecursiveDeleteKey} {win} {
+test registry-10.1 {RecursiveDeleteKey} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3
@@ -552,7 +555,7 @@ test registry-10.1 {RecursiveDeleteKey} {win} {
set result [registry keys HKEY_CLASSES_ROOT TclFoobar]
set result
} {}
-test registry-10.2 {RecursiveDeleteKey} {win} {
+test registry-10.2 {RecursiveDeleteKey} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test1
registry set HKEY_CLASSES_ROOT\\TclFoobar\\test2\\test3
@@ -561,36 +564,36 @@ test registry-10.2 {RecursiveDeleteKey} {win} {
set result
} {}
-test registry-11.1 {SetValue: recursive creation} {win} {
+test registry-11.1 {SetValue: recursive creation} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat foobar
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar\\baz blat]
} foobar
-test registry-11.2 {SetValue: modification} {win} {
+test registry-11.2 {SetValue: modification} {win reg} {
registry delete HKEY_CLASSES_ROOT\\TclFoobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat foobar
registry set HKEY_CLASSES_ROOT\\TclFoobar\\baz blat frob
set result [registry get HKEY_CLASSES_ROOT\\TclFoobar\\baz blat]
} frob
-test registry-11.3 {SetValue: failure} {win nonPortable english} {
+test registry-11.3 {SetValue: failure} {win reg nonPortable english} {
# This test will only succeed if the current user does not have registry
# access on the specified machine.
list [catch {registry set {\\mom\HKEY_CLASSES_ROOT\TclFoobar} bar foobar} msg] $msg
} {1 {unable to open key: Access is denied.}}
-test registry-12.1 {BroadcastValue} {win} {
+test registry-12.1 {BroadcastValue} {win reg} {
list [catch {registry broadcast} msg] $msg
} {1 {wrong # args: should be "registry broadcast keyName ?-timeout millisecs?"}}
-test registry-12.2 {BroadcastValue} {win} {
+test registry-12.2 {BroadcastValue} {win reg} {
list [catch {registry broadcast "" -time} msg] $msg
} {1 {wrong # args: should be "registry broadcast keyName ?-timeout millisecs?"}}
-test registry-12.3 {BroadcastValue} {win} {
+test registry-12.3 {BroadcastValue} {win reg} {
list [catch {registry broadcast "" - 500} msg] $msg
} {1 {wrong # args: should be "registry broadcast keyName ?-timeout millisecs?"}}
-test registry-12.4 {BroadcastValue} {win} {
+test registry-12.4 {BroadcastValue} {win reg} {
list [catch {registry broadcast {Environment}} msg] $msg
} {0 {1 0}}
-test registry-12.5 {BroadcastValue} {win} {
+test registry-12.5 {BroadcastValue} {win reg} {
list [catch {registry b {}} msg] $msg
} {0 {1 0}}
diff --git a/tests/winDde.test b/tests/winDde.test
index ca3ecd6..9b8b065 100644
--- a/tests/winDde.test
+++ b/tests/winDde.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: winDde.test,v 1.23 2004/06/23 22:45:27 patthoyts Exp $
+# RCS: @(#) $Id: winDde.test,v 1.24 2004/10/27 20:53:37 davygrvy Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -19,16 +19,19 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
if {$tcl_platform(platform) == "windows"} {
if [catch {
- set lib [lindex [glob -directory [file join [pwd] [file dirname \
- [info nameofexecutable]]] tcldde*.dll] 0]
- load $lib dde
- testConstraint dde 1
+ # 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
+ }
+ ::tcltest::testConstraint dde 1
}] {
- testConstraint dde 0
- puts "WARNING: Unable to find the dde package. Skipping dde tests."
+ ::tcltest::testConstraint dde 0
}
}
+
# -------------------------------------------------------------------------
# Setup a script for a test server
#
@@ -40,6 +43,9 @@ proc createChildProcess { ddeServerName {handler {}}} {
set f [open $::scriptName w+]
puts $f [list set ddeServerName $ddeServerName]
+ if {$::ddelib != ""} {
+ puts $f [list load $::ddelib Dde]
+ }
puts $f {
# DDE child server -
#
@@ -47,17 +53,6 @@ proc createChildProcess { ddeServerName {handler {}}} {
package require tcltest
namespace import -force ::tcltest::*
}
- # Load the dde package to test.
- if [catch {
- set lib [lindex [glob -directory \
- [file join [pwd] [file dirname [info nameofexecutable]]] \
- tcldde*.dll] 0]
- load $lib dde
- }] {
- puts "Unable to find the dde package. Skipping dde tests."
- ::tcltest::cleanupTests
- return
- }
# If an error occurs during the tests, this process may end up not
# being closed down. To deal with this we create a 30s timeout.
@@ -261,14 +256,14 @@ test winDde-6.6 {DDE remote servername collision force} -constraints {stdio win
test winDde-7.1 {Load DDE in slave interpreter } -constraints {win dde} -setup {
interp create slave
} -body {
- slave eval [list load $lib dde]
+ slave eval [list load $::ddelib Dde]
slave eval [list dde servername -- dde-interp-7.1]
} -cleanup {
interp delete slave
} -result {dde-interp-7.1}
test winDde-7.2 {DDE slave cleanup} -constraints {win dde} -setup {
interp create slave
- slave eval [list load $lib dde]
+ slave eval [list load $::ddelib Dde]
slave eval [list dde servername -- dde-interp-7.5]
interp delete slave
} -body {
@@ -281,7 +276,7 @@ test winDde-7.2 {DDE slave cleanup} -constraints {win dde} -setup {
} -result {}
test winDde-7.3 {DDE present in slave interp} -constraints {win dde} -setup {
interp create slave
- slave eval [list load $lib dde]
+ slave eval [list load $::ddelib Dde]
slave eval [list dde servername -- dde-interp-7.3]
} -body {
dde services TclEval dde-interp-7.3
@@ -290,7 +285,7 @@ test winDde-7.3 {DDE present in slave interp} -constraints {win dde} -setup {
} -result {{TclEval dde-interp-7.3}}
test winDde-7.4 {interp name collision with -force} -constraints {win dde} -setup {
interp create slave
- slave eval [list load $lib dde]
+ slave eval [list load $::ddelib Dde]
slave eval [list dde servername -- dde-interp-7.4]
} -body {
dde servername -force -- dde-interp-7.4
@@ -299,7 +294,7 @@ test winDde-7.4 {interp name collision with -force} -constraints {win dde} -setu
} -result {dde-interp-7.4}
test winDde-7.5 {interp name collision without -force} -constraints {win dde} -setup {
interp create slave
- slave eval [list load $lib dde]
+ slave eval [list load $::ddelib Dde]
slave eval [list dde servername -- dde-interp-7.5]
} -body {
dde servername -- dde-interp-7.5
@@ -311,7 +306,7 @@ test winDde-7.5 {interp name collision without -force} -constraints {win dde} -s
test winDde-8.1 {Safe DDE load} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
} -body {
list [catch {slave eval dde servername slave} msg] $msg
} -cleanup {
@@ -319,20 +314,20 @@ test winDde-8.1 {Safe DDE load} -constraints {win dde} -setup {
} -result {1 {invalid command name "dde"}}
test winDde-8.2 {Safe DDE set servername} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
} -body {
slave invokehidden dde servername slave
} -cleanup {interp delete slave} -result {slave}
test winDde-8.3 {Safe DDE check handler required for eval} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave invokehidden dde servername slave
} -body {
catch {dde eval slave set a 1} msg
} -cleanup {interp delete slave} -result {1}
test winDde-8.4 {Safe DDE check that execute is denied} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave invokehidden dde servername slave
} -body {
slave eval set a 1
@@ -343,7 +338,7 @@ test winDde-8.4 {Safe DDE check that execute is denied} -constraints {win dde} -
} -cleanup {interp delete slave} -result {0 1}
test winDde-8.5 {Safe DDE check that request is denied} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave invokehidden dde servername slave
} -body {
slave eval set a 1
@@ -353,14 +348,14 @@ test winDde-8.5 {Safe DDE check that request is denied} -constraints {win dde} -
} -result {1 {remote server cannot handle this command}}
test winDde-8.6 {Safe DDE assign handler procedure} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave eval {proc DDEACCEPT {cmd} {set ::DDECMD $cmd}}
} -body {
slave invokehidden dde servername -handler DDEACCEPT slave
} -cleanup {interp delete slave} -result slave
test winDde-8.7 {Safe DDE check simple command} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave eval {proc DDEACCEPT {cmd} {set ::DDECMD $cmd}}
slave invokehidden dde servername -handler DDEACCEPT slave
} -body {
@@ -370,7 +365,7 @@ test winDde-8.7 {Safe DDE check simple command} -constraints {win dde} -setup {
} -cleanup {interp delete slave} -result {0 {set x 1}}
test winDde-8.8 {Safe DDE check non-list command} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave eval {proc DDEACCEPT {cmd} {set ::DDECMD $cmd}}
slave invokehidden dde servername -handler DDEACCEPT slave
} -body {
@@ -382,7 +377,7 @@ test winDde-8.8 {Safe DDE check non-list command} -constraints {win dde} -setup
} -cleanup {interp delete slave} -result {0 0}
test winDde-8.9 {Safe DDE check command evaluation} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave eval {proc DDEACCEPT {cmd} {set ::DDECMD [uplevel \#0 $cmd]}}
slave invokehidden dde servername -handler DDEACCEPT slave
} -body {
@@ -393,7 +388,7 @@ test winDde-8.9 {Safe DDE check command evaluation} -constraints {win dde} -setu
} -cleanup {interp delete slave} -result {0 1}
test winDde-8.10 {Safe DDE check command evaluation (2)} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave eval {proc DDEACCEPT {cmd} {set ::DDECMD [uplevel \#0 $cmd]}}
slave invokehidden dde servername -handler DDEACCEPT slave
} -body {
@@ -404,7 +399,7 @@ test winDde-8.10 {Safe DDE check command evaluation (2)} -constraints {win dde}
} -cleanup {interp delete slave} -result {0 1}
test winDde-8.11 {Safe DDE check command evaluation (3)} -constraints {win dde} -setup {
interp create -safe slave
- slave invokehidden load $lib dde
+ slave invokehidden load $::ddelib Dde
slave eval {proc DDEACCEPT {cmd} {set ::DDECMD [uplevel \#0 $cmd]}}
slave invokehidden dde servername -handler DDEACCEPT slave
} -body {
diff --git a/win/Makefile.in b/win/Makefile.in
index b51f4b5..dfe42fd 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -5,7 +5,7 @@
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.
#
-# RCS: @(#) $Id: Makefile.in,v 1.82 2004/10/20 18:12:25 andreas_kupries Exp $
+# RCS: @(#) $Id: Makefile.in,v 1.83 2004/10/27 20:53:37 davygrvy Exp $
VERSION = @TCL_VERSION@
@@ -623,12 +623,14 @@ install-private-headers: libraries
test: binaries $(TCLTEST)
TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
./$(TCLTEST) "$(ROOT_DIR_NATIVE)/tests/all.tcl" $(TESTFLAGS) \
- | ./$(CAT32)
+ -load "set ::ddelib [file normalize ${DDE_DLL_FILE}]; \
+ set ::reglib [file normalize ${REG_DLL_FILE}]" | ./$(CAT32)
# Useful target to launch a built tcltest with the proper path,...
runtest: binaries $(TCLTEST)
@TCL_LIBRARY="$(LIBRARY_DIR)"; export TCL_LIBRARY; \
- ./$(TCLTEST) $(TESTFLAGS) $(SCRIPT)
+ ./$(TCLTEST) $(TESTFLAGS) -load "set ::ddelib [file normalize ${DDE_DLL_FILE}]; \
+ set ::reglib [file normalize ${REG_DLL_FILE}]" $(SCRIPT)
# This target can be used to run tclsh from the build directory
# via `make shell SCRIPT=foo.tcl`
diff --git a/win/makefile.vc b/win/makefile.vc
index c553016..ad5b4cc 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -12,7 +12,7 @@
# Copyright (c) 2001-2004 David Gravereaux.
#
#------------------------------------------------------------------------------
-# RCS: @(#) $Id: makefile.vc,v 1.134 2004/09/27 14:31:21 kennykb Exp $
+# RCS: @(#) $Id: makefile.vc,v 1.135 2004/10/27 20:53:38 davygrvy Exp $
#------------------------------------------------------------------------------
!if !defined(MSDEVDIR) && !defined(MSVCDIR)
@@ -465,10 +465,16 @@ install: install-binaries install-libraries install-docs
test: setup $(TCLTEST) dlls $(CAT32)
set TCL_LIBRARY=$(ROOT)/library
!if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE"
- $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS)
+ $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) -loadfile <<
+ set ::ddelib [file normalize $(TCLDDELIB:\=/)]
+ set ::reglib [file normalize $(TCLREGLIB:\=/)]
+<<
!else
@echo Please wait while the tests are collected...
- $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) > tests.log
+ $(TCLTEST) "$(ROOT)/tests/all.tcl" $(TESTFLAGS) -loadfile <<
+ set ::ddelib [file normalize $(TCLDDELIB:\=/)]
+ set ::reglib [file normalize $(TCLREGLIB:\=/)]
+<< > tests.log
type tests.log | more
!endif
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index e2f399f..c6438f1 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinThrd.c,v 1.33 2004/07/21 01:45:45 hobbs Exp $
+ * RCS: @(#) $Id: tclWinThrd.c,v 1.34 2004/10/27 20:53:38 davygrvy Exp $
*/
#include "tclWinInt.h"
@@ -437,7 +437,8 @@ TclFinalizeLock ()
allocOnce = 0;
}
#endif
- /* Destroy the critical section that we are holding! */
+ LeaveCriticalSection(&initLock);
+ /* Destroy the critical section that we were holding. */
DeleteCriticalSection(&initLock);
}