diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-21 11:31:41 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2012-05-21 11:31:41 (GMT) |
commit | e0e9c5532b3d5927e6c9bce1e8619e111067b9cb (patch) | |
tree | 24d7ecadf8de0e345b0e8f4104b8ac44dd6ad3ca /tests | |
parent | 40ff07a07969afd5de9232f869a9405dcc68f2a4 (diff) | |
parent | 2f53eeab0b9831c99ec00b1728bcd2821e3d46ea (diff) | |
download | tcl-e0e9c5532b3d5927e6c9bce1e8619e111067b9cb.zip tcl-e0e9c5532b3d5927e6c9bce1e8619e111067b9cb.tar.gz tcl-e0e9c5532b3d5927e6c9bce1e8619e111067b9cb.tar.bz2 |
TIP #106: Add Encoding Abilities to the [dde] Command
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 ""} |