diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-25 07:28:08 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-04-25 07:28:08 (GMT) |
commit | 99ea4405aed6acebfa01e202fbf947decdfae5ee (patch) | |
tree | bd85b645149e792f78426f195b85591debdf05d7 /tests/winDde.test | |
parent | 67e2135f3ad85c23c2093c309e90204ee4b81d77 (diff) | |
download | tcl-99ea4405aed6acebfa01e202fbf947decdfae5ee.zip tcl-99ea4405aed6acebfa01e202fbf947decdfae5ee.tar.gz tcl-99ea4405aed6acebfa01e202fbf947decdfae5ee.tar.bz2 |
Update dde to version 1.3.3.
Update registry to version 1.2.2.
(the same as distributed with Tcl 8.5.14)
Diffstat (limited to 'tests/winDde.test')
-rw-r--r-- | tests/winDde.test | 94 |
1 files changed, 53 insertions, 41 deletions
diff --git a/tests/winDde.test b/tests/winDde.test index 85fb5a6..454e76d 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -2,7 +2,7 @@ # # This file contains a collection of tests for one or more of the Tcl # built-in commands. Sourcing this file into Tcl runs the tests and -# generates output for errors. No output means no errors were found. +# generates output for errors. No output means no errors were found. # # Copyright (c) 1999 by Scriptics Corporation. # @@ -66,6 +66,8 @@ proc createChildProcess { ddeServerName } { return $f } +# ------------------------------------------------------------------------- + test winDde-1.1 {Settings the server's topic name} {pcOnly} { list [dde servername foobar] [dde servername] [dde servername self] } {foobar foobar self} @@ -84,6 +86,8 @@ test winDde-2.3 {Checking for existence, with only the service specified} \ expr [llength [dde services TclEval {}]] >= 1 } 1 +# ------------------------------------------------------------------------- + test winDde-3.1 {DDE execute locally} {pcOnly} { set a "" dde execute TclEval self {set a "foo"} @@ -114,47 +118,48 @@ test winDde-3.5 {DDE request locally} {pcOnly} { dde request -binary TclEval self a } "foo\x00" +# ------------------------------------------------------------------------- + test winDde-4.1 {DDE execute remotely} {stdio pcOnly} { - 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} { - 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} { - 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} { - 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] + set a "" + set name child-4.1 + set child [createChildProcess $name] + dde execute TclEval $name {set a "foo"} + dde execute TclEval $name {set done 1} + update + set a +} "" +test winDde-4.2 {DDE execute async remotely} {stdio pcOnly} { + set a "" + set name child-4.2 + set child [createChildProcess $name] + dde execute -async TclEval $name {set a "foo"} + update + dde execute TclEval $name {set done 1} + update + set a +} "" +test winDde-4.3 {DDE request remotely} {stdio pcOnly} { + set a "" + set name chile-4.3 + set child [createChildProcess $name] + dde execute TclEval $name {set a "foo"} + set a [dde request TclEval $name a] + dde execute TclEval $name {set done 1} + update + set a +} foo +test winDde-4.4 {DDE eval remotely} {stdio pcOnly} { + set a "" + set name child-4.4 + set child [createChildProcess $name] + set a [dde eval $name set a "foo"] + dde execute TclEval $name {set done 1} + update + set a +} foo + +# ------------------------------------------------------------------------- test winDde-5.1 {check for bad arguments} {pcOnly} { catch {dde execute "" "" "" ""} result @@ -175,7 +180,14 @@ test winDde-5.4 {DDE eval bad arguments} {pcOnly} { list [catch {dde eval "" "foo"} msg] $msg } {1 {invalid service name ""}} +# ------------------------------------------------------------------------- + #cleanup +#catch {interp delete $slave}; # ensure we clean up the slave. file delete -force $::scriptName ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: |