diff options
author | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-05-21 11:31:41 (GMT) |
---|---|---|
committer | jan.nijtmans <jan.nijtmans@noemail.net> | 2012-05-21 11:31:41 (GMT) |
commit | 51b827e89961ad7b05fb129e723cf870ffddb94a (patch) | |
tree | 24d7ecadf8de0e345b0e8f4104b8ac44dd6ad3ca /tests | |
parent | bbfe29361a9233dfc2d6f1b244f97bce822a0fc8 (diff) | |
parent | 5a85f686657cf166338869189744e39889bbe157 (diff) | |
download | tcl-51b827e89961ad7b05fb129e723cf870ffddb94a.zip tcl-51b827e89961ad7b05fb129e723cf870ffddb94a.tar.gz tcl-51b827e89961ad7b05fb129e723cf870ffddb94a.tar.bz2 |
TIP #106: Add Encoding Abilities to the [dde] Command
FossilOrigin-Name: caff0b1e8741bc09a96e3813536f7bbc8a0a8f77
Diffstat (limited to 'tests')
-rw-r--r-- | tests/winDde.test | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/winDde.test b/tests/winDde.test index ca50a96..bc64a24 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -156,6 +156,20 @@ test winDde-3.5 {DDE request locally} {win dde} { dde execute TclEval self {set a "foo"} dde request -binary TclEval self a } "foo\x00" +# Set variable a to A with diaeresis (unicode C4) by relying on the fact +# that utf8 is sent (e.g. "c3 84" on the wire) +test winDde-3.6 {DDE request utf8} {win dde} { + set a "not set" + dde execute TclEval self "set a \xc4" + scan $a %c +} 196 +# Set variable a to A with diaeresis (unicode C4) using binary execute +# and compose utf-8 (e.g. "c3 84" ) manualy +test winDde-3.7 {DDE request binary} {win dde} { + set a "not set" + dde execute -binary TclEval self "set a \xc3\x84\x00" + scan $a %c +} 196 # ------------------------------------------------------------------------- @@ -202,13 +216,13 @@ test winDde-4.4 {DDE eval remotely} {stdio win dde} { test winDde-5.1 {check for bad arguments} -constraints {win dde} -body { dde execute "" "" "" "" -} -returnCodes error -result {wrong # args: should be "dde execute ?-async? serviceName topicName value"} +} -returnCodes error -result {wrong # args: should be "dde execute ?-async? ?-binary? serviceName topicName value"} test winDde-5.2 {check for bad arguments} -constraints {win dde} -body { dde execute "" "" "" } -returnCodes error -result {cannot execute null data} test winDde-5.3 {check for bad arguments} -constraints {win dde} -body { dde execute -foo "" "" "" -} -returnCodes error -result {wrong # args: should be "dde execute ?-async? serviceName topicName value"} +} -returnCodes error -result {wrong # args: should be "dde execute ?-async? ?-binary? serviceName topicName value"} test winDde-5.4 {DDE eval bad arguments} -constraints {win dde} -body { dde eval "" "foo" } -returnCodes error -result {invalid service name ""} |