diff options
author | hobbs <hobbs@noemail.net> | 2001-08-22 23:56:14 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2001-08-22 23:56:14 (GMT) |
commit | b559dcba05751a942b05da67904d61af898dbd01 (patch) | |
tree | 1faf7bcdcfb4e82eaf53432d010b90a2130e83dc /tests/winDde.test | |
parent | e2be18005dd5952424794648c291fea34b070661 (diff) | |
download | tcl-b559dcba05751a942b05da67904d61af898dbd01.zip tcl-b559dcba05751a942b05da67904d61af898dbd01.tar.gz tcl-b559dcba05751a942b05da67904d61af898dbd01.tar.bz2 |
* doc/dde.n: fixed dde man page (which was totally incorrect).
* tests/winDde.test:
* win/tclWinDde.c (Tcl_DdeObjCmd): added -binary option to dde
request command to allow for returning binary data. [Bug #227482]
Updated dde to 1.2
FossilOrigin-Name: 679f1843c3652d2ddb53b04ecc3a9a6ff8588f3a
Diffstat (limited to 'tests/winDde.test')
-rw-r--r-- | tests/winDde.test | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/tests/winDde.test b/tests/winDde.test index 3657d43..5afae757 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.10 2001/07/31 19:12:07 vincentdarley Exp $ +# RCS: @(#) $Id: winDde.test,v 1.11 2001/08/22 23:56:14 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -22,7 +22,7 @@ if {$tcl_platform(platform) == "windows"} { [info nameofexecutable]]] tcldde*.dll] 0] load $lib dde }] { - puts "Unable to find the dde package. Skipping dde tests." + puts "WARNING: Unable to find the dde package. Skipping dde tests." ::tcltest::cleanupTests return } @@ -30,16 +30,19 @@ if {$tcl_platform(platform) == "windows"} { set scriptName script1.tcl - proc createChildProcess { ddeServerName } { - file delete -force $::scriptName - + set f [open $::scriptName w+] puts $f { + if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import -force ::tcltest::* + } if [catch { - set lib [lindex [glob -directory [file join [pwd] [file dirname \ - [info nameofexecutable]]] tcldde*.dll] 0] + 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." @@ -47,7 +50,7 @@ proc createChildProcess { ddeServerName } { return } } - puts $f "dde servername $ddeServerName" + puts $f [list dde servername $ddeServerName] puts $f { puts ready vwait done @@ -103,11 +106,16 @@ test winDde-3.4 {DDE eval locally} {pcOnly} { dde eval self set a "foo" } foo +test winDde-3.5 {DDE request locally} {pcOnly} { + set a "" + dde execute TclEval self {set a "foo"} + dde request -binary TclEval self a +} "foo\x00" + test winDde-4.1 {DDE execute remotely} {pcOnly} { set a "" set child [createChildProcess child] dde execute TclEval child {set a "foo"} - dde execute TclEval child {set done 1} set a @@ -117,7 +125,6 @@ test winDde-4.2 {DDE execute remotely} {pcOnly} { set a "" set child [createChildProcess child] dde execute -async TclEval child {set a "foo"} - dde execute TclEval child {set done 1} set a @@ -128,8 +135,6 @@ test winDde-4.3 {DDE request locally} {pcOnly} { set child [createChildProcess child] dde execute TclEval child {set a "foo"} set a [dde request TclEval child a] - - dde execute TclEval child {set done 1} set a @@ -139,7 +144,6 @@ test winDde-4.4 {DDE eval locally} {pcOnly} { set a "" set child [createChildProcess child] set a [dde eval child set a "foo"] - dde execute TclEval child {set done 1} set a @@ -160,9 +164,7 @@ test winDde-5.3 {check for bad arguments} {pcOnly} { set result } {wrong # args: should be "dde execute ?-async? serviceName topicName value"} - #cleanup file delete -force $::scriptName ::tcltest::cleanupTests return - |