summaryrefslogtreecommitdiffstats
path: root/tests/winDde.test
diff options
context:
space:
mode:
authorpatthoyts <patthoyts@users.sourceforge.net>2005-06-21 22:59:00 (GMT)
committerpatthoyts <patthoyts@users.sourceforge.net>2005-06-21 22:59:00 (GMT)
commitbca48b6e754f8ce2f39e3351269e36df55e84aec (patch)
tree15a8b711576f81f8fa6583b0d032a08e539eaf15 /tests/winDde.test
parent0375edfa2db5ae21e0d5d56f26b5eb4d62a2fe1e (diff)
downloadtcl-bca48b6e754f8ce2f39e3351269e36df55e84aec.zip
tcl-bca48b6e754f8ce2f39e3351269e36df55e84aec.tar.gz
tcl-bca48b6e754f8ce2f39e3351269e36df55e84aec.tar.bz2
* tests/winDde.test: Added some waits to the dde server script to
let event processing run after we create the dde server and before we exit the server process. This avoids 'server did not respond' errors.
Diffstat (limited to 'tests/winDde.test')
-rw-r--r--tests/winDde.test72
1 files changed, 40 insertions, 32 deletions
diff --git a/tests/winDde.test b/tests/winDde.test
index a1472fa..699ffb6 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.13.2.1 2004/06/15 13:00:57 patthoyts Exp $
+# RCS: @(#) $Id: winDde.test,v 1.13.2.2 2005/06/21 22:59:03 patthoyts Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -52,14 +52,18 @@ proc createChildProcess { ddeServerName } {
}
puts $f [list dde servername $ddeServerName]
puts $f {
+ after 200 {set ready 1}
+ vwait ready
puts ready
vwait done
- update
+ after 200 {set final 1}
+ vwait final
exit
}
close $f
set f [open |[list [interpreter] $::scriptName] r]
+ fconfigure $f -buffering line -blocking 1
gets $f
return $f
}
@@ -113,42 +117,46 @@ test winDde-3.5 {DDE request locally} {pcOnly} {
} "foo\x00"
test winDde-4.1 {DDE execute remotely} {stdio pcOnly} {
- set a ""
- set child [createChildProcess child]
- dde execute TclEval child {set a "foo"}
- dde execute TclEval child {set done 1}
-
- set a
-} ""
+ list [catch {
+ set a ""
+ set child [createChildProcess child]
+ dde execute TclEval child {set a "foo"}
+ dde execute TclEval child {set done 1}
+ set a
+ } err] $err
+} [list 0 ""]
test winDde-4.2 {DDE execute remotely} {stdio pcOnly} {
- set a ""
- set child [createChildProcess child]
- dde execute -async TclEval child {set a "foo"}
- update
- dde execute TclEval child {set done 1}
-
- set a
-} ""
+ list [catch {
+ set a ""
+ set child [createChildProcess child]
+ dde execute -async TclEval child {set a "foo"}
+ after 400 {set ::_dde_forever 1} ; vwait ::_dde_forever; #update
+ dde execute TclEval child {set done 1}
+ set a
+ } err] $err
+} [list 0 ""]
test winDde-4.3 {DDE request locally} {stdio pcOnly} {
- set a ""
- 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
-} foo
+ list [catch {
+ set a ""
+ 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
+ } err] $err
+} [list 0 foo]
test winDde-4.4 {DDE eval locally} {stdio pcOnly} {
- set a ""
- set child [createChildProcess child]
- set a [dde eval child set a "foo"]
- dde execute TclEval child {set done 1}
-
- set a
-} foo
+ list [catch {
+ set a ""
+ set child [createChildProcess child]
+ set a [dde eval child set a "foo"]
+ dde execute TclEval child {set done 1}
+ set a
+ } err] $err
+} [list 0 foo]
test winDde-5.1 {check for bad arguments} {pcOnly} {
catch {dde execute "" "" "" ""} result