summaryrefslogtreecommitdiffstats
path: root/tests/winDde.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/winDde.test')
-rw-r--r--tests/winDde.test57
1 files changed, 39 insertions, 18 deletions
diff --git a/tests/winDde.test b/tests/winDde.test
index 9e0b20a..8d9bd12 100644
--- a/tests/winDde.test
+++ b/tests/winDde.test
@@ -15,6 +15,7 @@ if {"::tcltest" ni [namespace children]} {
namespace import -force ::tcltest::*
}
+testConstraint debug [::tcl::pkgconfig get debug]
testConstraint dde 0
if {[testConstraint win]} {
if {![catch {
@@ -139,33 +140,43 @@ test winDde-3.2 {DDE execute -async locally} -constraints dde -body {
set \xe1
} -result foo
test winDde-3.3 {DDE request locally} -constraints dde -body {
- set a ""
- dde execute TclEval self [list set a foo]
- dde request TclEval self a
+ set \xe1 ""
+ dde execute TclEval self [list set \xe1 foo]
+ dde request TclEval self \xe1
} -result foo
test winDde-3.4 {DDE eval locally} -constraints dde -body {
set \xe1 ""
dde eval self set \xe1 foo
} -result foo
test winDde-3.5 {DDE request locally} -constraints dde -body {
- set a ""
- dde execute TclEval self [list set a foo]
- dde request -binary TclEval self a
+ set \xe1 ""
+ dde execute TclEval self [list set \xe1 foo]
+ dde request -binary TclEval self \xe1
} -result "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} -constraints dde -body {
- set a "not set"
- dde execute TclEval self "set a \xc4"
- scan $a %c
+ set \xe1 "not set"
+ dde execute TclEval self "set \xe1 \xc4"
+ scan [set \xe1] %c
} -result 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} -constraints dde -body {
- set a "not set"
- dde execute -binary TclEval self [list set a \xc3\x84\x00]
- scan $a %c
+ set \xe1 "not set"
+ dde execute -binary TclEval self [list set \xc3\xa1 \xc3\x84\x00]
+ scan [set \xe1] %c
} -result 196
+test winDde-3.8 {DDE poke locally} -constraints {dde debug} -body {
+ set \xe1 ""
+ dde poke TclEval self \xe1 \xc4
+ dde request TclEval self \xe1
+} -result \xc4
+test winDde-3.9 {DDE poke -binary locally} -constraints {dde debug} -body {
+ set \xe1 ""
+ dde poke -binary TclEval self \xe1 \xc3\x84\x00
+ dde request TclEval self \xe1
+} -result \xc4
# -------------------------------------------------------------------------
@@ -189,24 +200,34 @@ test winDde-4.2 {DDE execute async remotely} -constraints {dde stdio} -body {
set \xe1
} -result ""
test winDde-4.3 {DDE request remotely} -constraints {dde stdio} -body {
- set a ""
+ set \xe1 ""
set name ch\xEDld-4.3
set child [createChildProcess $name]
dde execute TclEval $name [list set a foo]
- set a [dde request TclEval $name a]
+ set \xe1 [dde request TclEval $name a]
dde execute TclEval $name {set done 1}
update
- set a
+ set \xe1
} -result foo
test winDde-4.4 {DDE eval remotely} -constraints {dde stdio} -body {
- set a ""
+ set \xe1 ""
set name ch\xEDld-4.4
set child [createChildProcess $name]
- set a [dde eval $name set a foo]
+ set \xe1 [dde eval $name set \xe1 foo]
dde execute TclEval $name {set done 1}
update
- set a
+ set \xe1
} -result foo
+test winDde-4.5 {DDE poke remotely} -constraints {dde debug stdio} -body {
+ set \xe1 ""
+ set name ch\xEDld-4.5
+ set child [createChildProcess $name]
+ dde poke TclEval $name \xe1 foo
+ set \xe1 [dde request TclEval $name \xe1]
+ dde execute TclEval $name {set done 1}
+ update
+ set \xe1
+} -result foo
# -------------------------------------------------------------------------