summaryrefslogtreecommitdiffstats
path: root/tests/winDde.test
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-08-22 23:56:14 (GMT)
committerhobbs <hobbs>2001-08-22 23:56:14 (GMT)
commitfbf8ffa9a660286e4fd91794781bf3957ae3ed06 (patch)
tree1faf7bcdcfb4e82eaf53432d010b90a2130e83dc /tests/winDde.test
parent4c4f94f7a768c1752cc7a2a9e853865f41d1d8d2 (diff)
downloadtcl-fbf8ffa9a660286e4fd91794781bf3957ae3ed06.zip
tcl-fbf8ffa9a660286e4fd91794781bf3957ae3ed06.tar.gz
tcl-fbf8ffa9a660286e4fd91794781bf3957ae3ed06.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
Diffstat (limited to 'tests/winDde.test')
-rw-r--r--tests/winDde.test32
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
-