From 6bf04853ecf35bd3d5b034fd47b57e31d1d7a754 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 4 Jul 2023 14:52:30 +0000 Subject: Use more uppercase hex in documentation and test-cases (for consistancy) --- changes | 2 +- doc/Encoding.3 | 16 ++++---- doc/binary.n | 40 ++++++++++---------- doc/chan.n | 2 +- tests/binary.test | 4 +- tests/encoding.test | 70 +++++++++++++++-------------------- tests/encodingVectors.tcl | 18 ++++----- tests/winConsole.test | 2 +- tests/winDde.test | 94 +++++++++++++++++++++++------------------------ 9 files changed, 118 insertions(+), 130 deletions(-) diff --git a/changes b/changes index 9bdb8c9..78ae47e 100644 --- a/changes +++ b/changes @@ -8247,7 +8247,7 @@ Dropped support for OS X versions less than 10.4 (Tiger) (fellows) 2013-06-05 (bug fix)[2835313] [while 1 {foo [continue]}] crash (fellows) -2013-06-17 (bug fix)[a876646] [:cntrl:] includes \x00 to \x1f (nijtmans) +2013-06-17 (bug fix)[a876646] [:cntrl:] includes \x00 to \x1F (nijtmans) 2013-06-27 (bug fix)[983509] missing encodings for config values (nijtmans) diff --git a/doc/Encoding.3 b/doc/Encoding.3 index 7453549..80bab73 100644 --- a/doc/Encoding.3 +++ b/doc/Encoding.3 @@ -580,13 +580,13 @@ encoding: E init {} final {} -iso8859-1 \ex1b(B -jis0201 \ex1b(J -jis0208 \ex1b$@ -jis0208 \ex1b$B -jis0212 \ex1b$(D -gb2312 \ex1b$A -ksc5601 \ex1b$(C +iso8859-1 \ex1B(B +jis0201 \ex1B(J +jis0208 \ex1B$@ +jis0208 \ex1B$B +jis0212 \ex1B$(D +gb2312 \ex1B$A +ksc5601 \ex1B$(C .CE .PP In the file, the first column represents an option and the second column @@ -598,7 +598,7 @@ marks that encoding. Tcl syntax is used for the values; in the above example, for instance, .QW \fB{}\fR represents the empty string and -.QW \fB\ex1b\fR +.QW \fB\ex1B\fR represents character 27. .PP When \fBTcl_GetEncoding\fR encounters an encoding \fIname\fR that has not diff --git a/doc/binary.n b/doc/binary.n index 70f569b..7968d77 100644 --- a/doc/binary.n +++ b/doc/binary.n @@ -240,7 +240,7 @@ which returns a binary string equivalent to: \fB\e254\fR .CE .PP -(i.e. \fB\exac\fR) by +(i.e. \fB\exAC\fR) by truncating the high-bits of the character, and which is probably not what is desired. .RE @@ -298,7 +298,7 @@ high-to-low order within each byte. For example, will return a binary string equivalent to: .PP .CS -\fB\exe0\exe1\exa0\fR +\fB\exE0\exE1\exA0\fR .CE .RE .IP \fBH\fR 5 @@ -325,7 +325,7 @@ remaining bits of the last byte will be zeros. For example, will return a binary string equivalent to: .PP .CS -\fB\exab\ex00\exde\exf0\ex98\fR +\fB\exAB\ex00\exDE\exF0\ex98\fR .CE .RE .IP \fBh\fR 5 @@ -340,7 +340,7 @@ low-to-high order within each byte. This is seldom required. For example, will return a binary string equivalent to: .PP .CS -\fB\exba\ex00\exed\ex0f\ex89\fR +\fB\exBA\ex00\exED\ex0F\ex89\fR .CE .RE .IP \fBc\fR 5 @@ -362,7 +362,7 @@ than \fIcount\fR, then the extra elements are ignored. For example, will return a binary string equivalent to: .PP .CS -\fB\ex03\exfd\ex80\ex04\ex02\ex05\fR +\fB\ex03\exFD\ex80\ex04\ex02\ex05\fR .CE .PP whereas: @@ -388,7 +388,7 @@ example, will return a binary string equivalent to: .PP .CS -\fB\ex03\ex00\exfd\exff\ex02\ex01\fR +\fB\ex03\ex00\exFD\exFF\ex02\ex01\fR .CE .RE .IP \fBS\fR 5 @@ -404,7 +404,7 @@ example, will return a binary string equivalent to: .PP .CS -\fB\ex00\ex03\exff\exfd\ex01\ex02\fR +\fB\ex00\ex03\exFF\exFD\ex01\ex02\fR .CE .RE .IP \fBt\fR 5 @@ -428,7 +428,7 @@ example, will return a binary string equivalent to: .PP .CS -\fB\ex03\ex00\ex00\ex00\exfd\exff\exff\exff\ex00\ex00\ex01\ex00\fR +\fB\ex03\ex00\ex00\ex00\exFD\exFF\exFF\exFF\ex00\ex00\ex01\ex00\fR .CE .RE .IP \fBI\fR 5 @@ -444,7 +444,7 @@ For example, will return a binary string equivalent to: .PP .CS -\fB\ex00\ex00\ex00\ex03\exff\exff\exff\exfd\ex00\ex01\ex00\ex00\fR +\fB\ex00\ex00\ex00\ex03\exFF\exFF\exFF\exFD\ex00\ex01\ex00\ex00\fR .CE .RE .IP \fBn\fR 5 @@ -509,7 +509,7 @@ on a Windows system running on an Intel Pentium processor, will return a binary string equivalent to: .PP .CS -\fB\excd\excc\excc\ex3f\ex9a\ex99\ex59\ex40\fR +\fB\exCD\exCC\exCC\ex3F\ex9A\ex99\ex59\ex40\fR .CE .RE .IP \fBr\fR 5 @@ -535,7 +535,7 @@ Windows system running on an Intel Pentium processor, will return a binary string equivalent to: .PP .CS -\fB\ex9a\ex99\ex99\ex99\ex99\ex99\exf9\ex3f\fR +\fB\ex9A\ex99\ex99\ex99\ex99\ex99\exF9\ex3F\fR .CE .RE .IP \fBq\fR 5 @@ -787,7 +787,7 @@ scanned. For example, .RS .PP .CS -\fBbinary scan\fR \ex07\exC6\ex05\ex1f\ex34 H3H* var1 var2 +\fBbinary scan\fR \ex07\exC6\ex05\ex1F\ex34 H3H* var1 var2 .CE .PP will return \fB2\fR with \fB07c\fR stored in \fIvar1\fR and @@ -838,7 +838,7 @@ example, .RS .PP .CS -\fBbinary scan\fR \ex05\ex00\ex07\ex00\exf0\exff s2s* var1 var2 +\fBbinary scan\fR \ex05\ex00\ex07\ex00\exF0\exFF s2s* var1 var2 .CE .PP will return \fB2\fR with \fB5 7\fR stored in \fIvar1\fR and \fB\-16\fR @@ -852,7 +852,7 @@ order. For example, .RS .PP .CS -\fBbinary scan\fR \ex00\ex05\ex00\ex07\exff\exf0 S2S* var1 var2 +\fBbinary scan\fR \ex00\ex05\ex00\ex07\exFF\exF0 S2S* var1 var2 .CE .PP will return \fB2\fR with \fB5 7\fR stored in \fIvar1\fR and \fB\-16\fR @@ -877,7 +877,7 @@ example, .RS .PP .CS -set str \ex05\ex00\ex00\ex00\ex07\ex00\ex00\ex00\exf0\exff\exff\exff +set str \ex05\ex00\ex00\ex00\ex07\ex00\ex00\ex00\exF0\exFF\exFF\exFF \fBbinary scan\fR $str i2i* var1 var2 .CE .PP @@ -893,7 +893,7 @@ immediately after the \fBI\fR. For example, .RS .PP .CS -set str \ex00\ex00\ex00\ex05\ex00\ex00\ex00\ex07\exff\exff\exff\exf0 +set str \ex00\ex00\ex00\ex05\ex00\ex00\ex00\ex07\exFF\exFF\exFF\exF0 \fBbinary scan\fR $str I2I* var1 var2 .CE .PP @@ -919,7 +919,7 @@ example, .RS .PP .CS -set str \ex05\ex00\ex00\ex00\ex07\ex00\ex00\ex00\exf0\exff\exff\exff +set str \ex05\ex00\ex00\ex00\ex07\ex00\ex00\ex00\exF0\exFF\exFF\exFF \fBbinary scan\fR $str wi* var1 var2 .CE .PP @@ -934,7 +934,7 @@ immediately after the \fBW\fR. For example, .RS .PP .CS -set str \ex00\ex00\ex00\ex05\ex00\ex00\ex00\ex07\exff\exff\exff\exf0 +set str \ex00\ex00\ex00\ex05\ex00\ex00\ex00\ex07\exFF\exFF\exFF\exF0 \fBbinary scan\fR $str WI* var1 var2 .CE .PP @@ -965,7 +965,7 @@ Intel Pentium processor, .RS .PP .CS -\fBbinary scan\fR \ex3f\excc\excc\excd f var1 +\fBbinary scan\fR \ex3F\exCC\exCC\exCD f var1 .CE .PP will return \fB1\fR with \fB1.6000000238418579\fR stored in @@ -989,7 +989,7 @@ running on an Intel Pentium processor, .RS .PP .CS -\fBbinary scan\fR \ex9a\ex99\ex99\ex99\ex99\ex99\exf9\ex3f d var1 +\fBbinary scan\fR \ex9A\ex99\ex99\ex99\ex99\ex99\exF9\ex3F d var1 .CE .PP will return \fB1\fR with \fB1.6000000000000001\fR diff --git a/doc/chan.n b/doc/chan.n index 70f451d..b184b00 100644 --- a/doc/chan.n +++ b/doc/chan.n @@ -168,7 +168,7 @@ applied to input only. The default value is the empty string, except that under Windows the default value for reading is Control-z (\ex1A). The acceptable range is \ex01 - -\ex7f. A value outside this range results in an error. +\ex7F. A value outside this range results in an error. .VS "TCL8.7 TIP656" .TP \fB\-profile\fR \fIprofile\fR diff --git a/tests/binary.test b/tests/binary.test index c51d0e9..2782a9d 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -2014,10 +2014,10 @@ test binary-53.19 {Tcl_BinaryObjCmd: format} {} { } \xCD\xCC\xCC\x3F test binary-53.20 {Tcl_BinaryObjCmd: float Inf} {} { binary format R Inf -} \x7f\x80\x00\x00 +} \x7F\x80\x00\x00 test binary-53.21 {Tcl_BinaryObjCmd: float Inf} {} { binary format r Inf -} \x00\x00\x80\x7f +} \x00\x00\x80\x7F test binary-53.22 {Binary float Inf round trip} -body { binary scan [binary format R Inf] R inf binary scan [binary format R -Inf] R inf_ diff --git a/tests/encoding.test b/tests/encoding.test index 8167357..0d56a0b 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -231,18 +231,6 @@ test encoding-10.1 {Tcl_UtfToExternal} { return $x } "ab\x8C\xC1g" -proc viewable {str} { - set res "" - foreach c [split $str {}] { - if {[string is print $c] && [string is ascii $c]} { - append res $c - } else { - append res "\\u[format %4.4X [scan $c %c]]" - } - } - return "$str ($res)" -} - test encoding-11.1 {LoadEncodingFile: unknown encoding} {testencoding} { set system [encoding system] set path [encoding dirs] @@ -264,11 +252,11 @@ test encoding-11.4 {LoadEncodingFile: multi-byte} { encoding convertfrom shiftjis \x8C\xC1 } 乎 test encoding-11.5 {LoadEncodingFile: escape file} { - viewable [encoding convertto iso2022 乎] -} [viewable "\x1B\$B8C\x1B(B"] + encoding convertto iso2022 乎 +} \x1B\$B8C\x1B(B test encoding-11.5.1 {LoadEncodingFile: escape file} { - viewable [encoding convertto iso2022-jp 乎] -} [viewable "\x1B\$B8C\x1B(B"] + encoding convertto iso2022-jp 乎 +} \x1B\$B8C\x1B(B test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding} -setup { set system [encoding system] set path [encoding dirs] @@ -292,17 +280,17 @@ test encoding-11.6 {LoadEncodingFile: invalid file} -constraints {testencoding} encoding system $system } -result {invalid encoding file "splat"} test encoding-11.8 {encoding: extended Unicode UTF-16} { - viewable [encoding convertto utf-16le 😹] -} {=Ø9Þ (=\u00D89\u00DE)} + encoding convertto utf-16le 😹 +} =Ø9Þ test encoding-11.9 {encoding: extended Unicode UTF-16} { - viewable [encoding convertto utf-16be 😹] -} {Ø=Þ9 (\u00D8=\u00DE9)} + encoding convertto utf-16be 😹 +} Ø=Þ9 test encoding-11.10 {encoding: extended Unicode UTF-32} { - viewable [encoding convertto utf-32le 😹] -} "9\xF6\x01\x00 (9\\u00F6\\u0001\\u0000)" + encoding convertto utf-32le 😹 +} 9\xF6\x01\x00 test encoding-11.11 {encoding: extended Unicode UTF-32} { - viewable [encoding convertto utf-32be 😹] -} "\x00\x01\xF69 (\\u0000\\u0001\\u00F69)" + encoding convertto utf-32be 😹 +} \x00\x01\xF69 # OpenEncodingFile is fully tested by the rest of the tests in this file. test encoding-12.1 {LoadTableEncoding: normal encoding} { @@ -329,8 +317,8 @@ test encoding-12.5 {LoadTableEncoding: symbol encoding} { } "ggγ" test encoding-13.1 {LoadEscapeTable} { - viewable [set x [encoding convertto iso2022 ab乎棙g]] -} [viewable "ab\x1B\$B8C\x1B\$\(DD%\x1B(Bg"] + encoding convertto iso2022 ab乎棙g +} ab\x1B\$B8C\x1B\$\(DD%\x1B(Bg test encoding-15.1 {UtfToUtfProc} { encoding convertto utf-8 £ @@ -740,14 +728,14 @@ test encoding-24.1 {EscapeFreeProc on open channels} exec { } {} test encoding-24.2 {EscapeFreeProc on open channels} {exec} { # Bug #524674 output - viewable [runInSubprocess { + runInSubprocess { encoding system cp1252; # Bug #2891556 crash revelator fconfigure stdout -encoding iso2022-jp puts ab乎棙g set env(TCL_FINALIZE_ON_EXIT) 1 exit - }] -} "ab\x1B\$B8C\x1B\$(DD%\x1B(Bg (ab\\u001B\$B8C\\u001B\$(DD%\\u001B(Bg)" + } +} "ab\x1B\$B8C\x1B\$(DD%\x1B(Bg" test encoding-24.3 {EscapeFreeProc on open channels} {stdio} { # Bug #219314 - if we don't free escape encodings correctly on channel # closure, we go boom @@ -761,8 +749,8 @@ test encoding-24.3 {EscapeFreeProc on open channels} {stdio} { set count [gets $f line] close $f removeFile iso2022.tcl - list $count [viewable $line] -} [list 3 "乎乞也 (\\u4E4E\\u4E5E\\u4E5F)"] + list $count $line +} [list 3 乎乞也] test encoding-24.4 {Parse valid or invalid utf-8} { string length [encoding convertfrom -profile tcl8 utf-8 "\xC0\x80"] @@ -1061,30 +1049,30 @@ runtests test encoding-bug-183a1adcc0-1 {Bug [183a1adcc0] Buffer overflow Tcl_UtfToExternal} -constraints { testencoding } -body { - # Note - buffers are initialized to \xff + # Note - buffers are initialized to \xFF list [catch {testencoding Tcl_UtfToExternal utf-16 A {start end} {} 1} result] $result -} -result [list 0 [list nospace {} \xff]] +} -result [list 0 [list nospace {} \xFF]] test encoding-bug-183a1adcc0-2 {Bug [183a1adcc0] Buffer overflow Tcl_UtfToExternal} -constraints { testencoding } -body { - # Note - buffers are initialized to \xff + # Note - buffers are initialized to \xFF list [catch {testencoding Tcl_UtfToExternal utf-16 A {start end} {} 0} result] $result } -result [list 0 [list nospace {} {}]] test encoding-bug-183a1adcc0-3 {Bug [183a1adcc0] Buffer overflow Tcl_UtfToExternal} -constraints { testencoding } -body { - # Note - buffers are initialized to \xff + # Note - buffers are initialized to \xFF list [catch {testencoding Tcl_UtfToExternal utf-16 A {start end} {} 2} result] $result } -result [list 0 [list nospace {} \x00\x00]] test encoding-bug-183a1adcc0-4 {Bug [183a1adcc0] Buffer overflow Tcl_UtfToExternal} -constraints { testencoding } -body { - # Note - buffers are initialized to \xff + # Note - buffers are initialized to \xFF list [catch {testencoding Tcl_UtfToExternal utf-16 A {start end} {} 3} result] $result -} -result [list 0 [list nospace {} \x00\x00\xff]] +} -result [list 0 [list nospace {} \x00\x00\xFF]] test encoding-bug-183a1adcc0-5 {Bug [183a1adcc0] Buffer overflow Tcl_UtfToExternal} -constraints { testencoding ucs2 knownBug @@ -1092,7 +1080,7 @@ test encoding-bug-183a1adcc0-5 {Bug [183a1adcc0] Buffer overflow Tcl_UtfToExtern # The knownBug constraint is because test depends on TCL_UTF_MAX and # also UtfToUtf16 assumes space required in destination buffer is # sizeof(Tcl_UniChar) which is incorrect when TCL_UTF_MAX==4 - # Note - buffers are initialized to \xff + # Note - buffers are initialized to \xFF list [catch {testencoding Tcl_UtfToExternal utf-16 A {start end} {} 4} result] $result } -result [list 0 [list ok {} [expr {$::tcl_platform(byteOrder) eq "littleEndian" ? "\x41\x00" : "\x00\x41"}]\x00\x00]] @@ -1110,13 +1098,13 @@ test encoding-29.0 {get encoding nul terminator lengths} -constraints { } -result {1 2 4 2 2} test encoding-bug-6a3e2cb0f0-1 {Bug [6a3e2cb0f0] - invalid bytes in escape encodings} -body { - encoding convertfrom -profile tcl8 iso2022-jp x\x1b\x7aaby + encoding convertfrom -profile tcl8 iso2022-jp x\x1B\x7Aaby } -result x\uFFFDy test encoding-bug-6a3e2cb0f0-2 {Bug [6a3e2cb0f0] - invalid bytes in escape encodings} -body { - encoding convertfrom -profile strict iso2022-jp x\x1b\x7aaby + encoding convertfrom -profile strict iso2022-jp x\x1B\x7Aaby } -returnCodes error -result {unexpected byte sequence starting at index 1: '\x1B'} test encoding-bug-6a3e2cb0f0-3 {Bug [6a3e2cb0f0] - invalid bytes in escape encodings} -body { - encoding convertfrom -profile replace iso2022-jp x\x1b\x7aaby + encoding convertfrom -profile replace iso2022-jp x\x1B\x7Aaby } -result x\uFFFDy test encoding-bug-66ffafd309-1-tcl8 {Bug [66ffafd309] - truncated DBCS} -body { diff --git a/tests/encodingVectors.tcl b/tests/encodingVectors.tcl index 986e221..3961917 100644 --- a/tests/encodingVectors.tcl +++ b/tests/encodingVectors.tcl @@ -32,7 +32,7 @@ set encValidStrings {}; # Reset the table lappend encValidStrings {*}{ ascii \u0000 00 {} {Lowest ASCII} - ascii \u007F 7F knownBug {Highest ASCII} + ascii \u007F 7F {} {Highest ASCII} ascii \u007D 7D {} {Brace - just to verify test scripts are escaped correctly} ascii \u007B 7B {} {Terminating brace - just to verify test scripts are escaped correctly} @@ -593,11 +593,11 @@ lappend encInvalidBytes {*}{ utf-32le 00D8000000DC0000 tcl8 \uD800\uDC00 -1 {} {High-low-surrogate-pair} utf-32le 00D8000000DC0000 replace \uFFFD\uFFFD -1 {} {High-low-surrogate-pair} utf-32le 00D8000000DC0000 strict {} 0 {} {High-low-surrogate-pair} - utf-32le 00001100 tcl8 \UFFFD -1 {} {Out of range} - utf-32le 00001100 replace \UFFFD -1 {} {Out of range} + utf-32le 00001100 tcl8 \uFFFD -1 {} {Out of range} + utf-32le 00001100 replace \uFFFD -1 {} {Out of range} utf-32le 00001100 strict {} 0 {} {Out of range} - utf-32le FFFFFFFF tcl8 \UFFFD -1 {} {Out of range} - utf-32le FFFFFFFF replace \UFFFD -1 {} {Out of range} + utf-32le FFFFFFFF tcl8 \uFFFD -1 {} {Out of range} + utf-32le FFFFFFFF replace \uFFFD -1 {} {Out of range} utf-32le FFFFFFFF strict {} 0 {} {Out of range} utf-32be 41 tcl8 \uFFFD -1 {solo tail} {Truncated} @@ -618,11 +618,11 @@ lappend encInvalidBytes {*}{ utf-32be 0000D8000000DC00 tcl8 \uD800\uDC00 -1 {} {High-low-surrogate-pair} utf-32be 0000D8000000DC00 replace \uFFFD\uFFFD -1 {} {High-low-surrogate-pair} utf-32be 0000D8000000DC00 strict {} 0 {} {High-low-surrogate-pair} - utf-32be 00110000 tcl8 \UFFFD -1 {} {Out of range} - utf-32be 00110000 replace \UFFFD -1 {} {Out of range} + utf-32be 00110000 tcl8 \uFFFD -1 {} {Out of range} + utf-32be 00110000 replace \uFFFD -1 {} {Out of range} utf-32be 00110000 strict {} 0 {} {Out of range} - utf-32be FFFFFFFF tcl8 \UFFFD -1 {} {Out of range} - utf-32be FFFFFFFF replace \UFFFD -1 {} {Out of range} + utf-32be FFFFFFFF tcl8 \uFFFD -1 {} {Out of range} + utf-32be FFFFFFFF replace \uFFFD -1 {} {Out of range} utf-32be FFFFFFFF strict {} 0 {} {Out of range} } diff --git a/tests/winConsole.test b/tests/winConsole.test index f030444..3f23c07 100644 --- a/tests/winConsole.test +++ b/tests/winConsole.test @@ -218,7 +218,7 @@ test console-fconfigure-get-1.[incr testnum] { Console get stdin option -eofchar } -constraints {win interactive} -body { fconfigure stdin -eofchar -} -result \x1a +} -result \x1A test console-fconfigure-get-1.[incr testnum] { fconfigure -winsize diff --git a/tests/winDde.test b/tests/winDde.test index 93b9242..8f4da11 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -130,104 +130,104 @@ test winDde-2.4 {Checking for existence, with only the topic specified} \ # ------------------------------------------------------------------------- test winDde-3.1 {DDE execute locally} -constraints dde -body { - set \xe1 "" - dde execute TclEval self [list set \xe1 foo] - set \xe1 + set \xE1 "" + dde execute TclEval self [list set \xE1 foo] + set \xE1 } -result foo test winDde-3.2 {DDE execute -async locally} -constraints dde -body { - set \xe1 "" - dde execute -async TclEval self [list set \xe1 foo] + set \xE1 "" + dde execute -async TclEval self [list set \xE1 foo] update - set \xe1 + set \xE1 } -result foo test winDde-3.3 {DDE request locally} -constraints dde -body { - set \xe1 "" - dde execute TclEval self [list set \xe1 foo] - dde request TclEval self \xe1 + 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 + set \xE1 "" + dde eval self set \xE1 foo } -result foo test winDde-3.5 {DDE request locally} -constraints dde -body { - set \xe1 "" - dde execute TclEval self [list set \xe1 foo] - dde request -binary TclEval self \xe1 + 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 utf-8 is sent (e.g. "c3 84" on the wire) test winDde-3.6 {DDE request utf-8} -constraints dde -body { - set \xe1 "not set" - dde execute TclEval self "set \xe1 \xc4" - scan [set \xe1] %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" ) manually test winDde-3.7 {DDE request binary} -constraints {dde notWine} -body { - set \xe1 "not set" - dde execute -binary TclEval self [list set \xc3\xa1 \xc3\x84\x00] - scan [set \xe1] %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 + 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 + set \xE1 "" + dde poke -binary TclEval self \xE1 \xC3\x84\x00 + dde request TclEval self \xE1 +} -result \xC4 # ------------------------------------------------------------------------- test winDde-4.1 {DDE execute remotely} -constraints {dde stdio} -body { - set \xe1 "" + set \xE1 "" set name ch\xEDld-4.1 set child [createChildProcess $name] - dde execute TclEval $name [list set \xe1 foo] + dde execute TclEval $name [list set \xE1 foo] dde execute TclEval $name {set done 1} update - set \xe1 + set \xE1 } -result "" test winDde-4.2 {DDE execute async remotely} -constraints {dde stdio} -body { - set \xe1 "" + set \xE1 "" set name ch\xEDld-4.2 set child [createChildProcess $name] - dde execute -async TclEval $name [list set \xe1 foo] + dde execute -async TclEval $name [list set \xE1 foo] update dde execute TclEval $name {set done 1} update - set \xe1 + set \xE1 } -result "" test winDde-4.3 {DDE request remotely} -constraints {dde stdio} -body { - set \xe1 "" + set \xE1 "" set name ch\xEDld-4.3 set child [createChildProcess $name] - dde execute TclEval $name [list set \xe1 foo] - set \xe1 [dde request TclEval $name \xe1] + dde execute TclEval $name [list set \xE1 foo] + set \xE1 [dde request TclEval $name \xE1] dde execute TclEval $name {set done 1} update - set \xe1 + set \xE1 } -result foo test winDde-4.4 {DDE eval remotely} -constraints {dde stdio} -body { - set \xe1 "" + set \xE1 "" set name ch\xEDld-4.4 set child [createChildProcess $name] - set \xe1 [dde eval $name set \xe1 foo] + set \xE1 [dde eval $name set \xE1 foo] dde execute TclEval $name {set done 1} update - set \xe1 + set \xE1 } -result foo test winDde-4.5 {DDE poke remotely} -constraints {dde debug stdio} -body { - set \xe1 "" + 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 poke TclEval $name \xE1 foo + set \xE1 [dde request TclEval $name \xE1] dde execute TclEval $name {set done 1} update - set \xe1 + set \xE1 } -result foo # ------------------------------------------------------------------------- @@ -402,8 +402,8 @@ test winDde-8.9 {Safe DDE check command evaluation} -constraints dde -setup { child eval {proc DDEACCEPT {cmd} {set ::DDECMD [uplevel \#0 $cmd]}} child invokehidden dde servername -handler DDEACCEPT child } -body { - dde eval child set \xe1 1 - child eval set \xe1 + dde eval child set \xE1 1 + child eval set \xE1 } -cleanup {interp delete child} -result 1 test winDde-8.10 {Safe DDE check command evaluation (2)} -constraints dde -setup { interp create -safe child -- cgit v0.12