diff options
author | dgp <dgp@users.sourceforge.net> | 2019-11-15 19:58:05 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2019-11-15 19:58:05 (GMT) |
commit | bab811ce01503b56512aedf78871afa70fbca473 (patch) | |
tree | 6a238996902aef411c468acbdd42381de8bd40e1 /tests | |
parent | 2ab36cc28aa0c2ee5162f017270225fd40b2190d (diff) | |
parent | 12a22416413a587980cbb7d9c9bc361db5f3e419 (diff) | |
download | tcl-bab811ce01503b56512aedf78871afa70fbca473.zip tcl-bab811ce01503b56512aedf78871afa70fbca473.tar.gz tcl-bab811ce01503b56512aedf78871afa70fbca473.tar.bz2 |
merge 8.6; update changes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/encoding.test | 34 | ||||
-rw-r--r-- | tests/io.test | 2 | ||||
-rw-r--r-- | tests/oo.test | 29 |
3 files changed, 64 insertions, 1 deletions
diff --git a/tests/encoding.test b/tests/encoding.test index ed0e6a4..36fcff6 100644 --- a/tests/encoding.test +++ b/tests/encoding.test @@ -328,6 +328,40 @@ test encoding-15.3 {UtfToUtfProc null character input} { binary scan [encoding convertto identity $y] H* z list [string bytelength $x] [string bytelength $y] $z } {1 2 c080} +test encoding-15.4 {UtfToUtfProc emoji character input} { + set x \xED\xA0\xBD\xED\xB8\x82 + set y [encoding convertfrom utf-8 \xED\xA0\xBD\xED\xB8\x82] + list [string length $x] [string length $y] $y +} "6 2 \uD83D\uDE02" +test encoding-15.5 {UtfToUtfProc emoji character input} { + set x \xF0\x9F\x98\x82 + set y [encoding convertfrom utf-8 \xF0\x9F\x98\x82] + list [string length $x] [string length $y] $y +} "4 2 \uD83D\uDE02" +test encoding-15.6 {UtfToUtfProc emoji character output} { + set x \uDE02\uD83D\uDE02\uD83D + set y [encoding convertto utf-8 \uDE02\uD83D\uDE02\uD83D] + binary scan $y H* z + list [string length $x] [string length $y] $z +} {4 10 edb882f09f9882eda0bd} +test encoding-15.7 {UtfToUtfProc emoji character output} { + set x \uDE02\uD83D\uD83D + set y [encoding convertto utf-8 \uDE02\uD83D\uD83D] + binary scan $y H* z + list [string length $x] [string length $y] $z +} {3 9 edb882eda0bdeda0bd} +test encoding-15.8 {UtfToUtfProc emoji character output} { + set x \uDE02\uD83D\xE9 + set y [encoding convertto utf-8 \uDE02\uD83D\xE9] + binary scan $y H* z + list [string length $x] [string length $y] $z +} {3 8 edb882eda0bdc3a9} +test encoding-15.9 {UtfToUtfProc emoji character output} { + set x \uDE02\uD83DX + set y [encoding convertto utf-8 \uDE02\uD83DX] + binary scan $y H* z + list [string length $x] [string length $y] $z +} {3 7 edb882eda0bd58} test encoding-16.1 {UnicodeToUtfProc} { set val [encoding convertfrom unicode NN] diff --git a/tests/io.test b/tests/io.test index 42122ac..1b23534 100644 --- a/tests/io.test +++ b/tests/io.test @@ -7383,7 +7383,7 @@ test io-53.3 {CopyData: background read underflow} {stdio unix openpipe fcopy} { close $f set result } "ready line1 line2 {done\n}" -test io-53.4 {CopyData: background write overflow} {stdio unix openpipe fileevent fcopy} { +test io-53.4 {CopyData: background write overflow} {stdio openpipe fileevent fcopy} { set big bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\n variable x for {set x 0} {$x < 12} {incr x} { diff --git a/tests/oo.test b/tests/oo.test index b0704da..77fca68 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -1353,6 +1353,35 @@ test oo-7.9 {OO: defining inheritance in namespaces} -setup { return } } -result {} +test oo-7.10 {OO: next after object deletion, bug [135804138e]} -setup { + set ::result "" + oo::class create c1 { + method m1 {} { + lappend ::result c1::m1 + } + } + oo::class create c2 { + superclass c1 + destructor { + lappend ::result c2::destructor + my m1 + lappend ::result /c2::destructor + } + method m1 {} { + lappend ::result c2::m1 + rename [self] {} + lappend ::result no-self + next + lappend ::result /c2::m1 + } + } +} -body { + c2 create o + lappend ::result [catch {o m1} msg] $msg +} -cleanup { + c1 destroy + unset ::result +} -result {c2::m1 c2::destructor c2::m1 no-self c1::m1 /c2::m1 /c2::destructor no-self 1 {no next method implementation}} test oo-8.1 {OO: global must work in methods} { oo::object create foo |