summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ioCmd.test31
-rw-r--r--tests/utf.test5
2 files changed, 34 insertions, 2 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 82f83db..6536072 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -2592,9 +2592,40 @@ test iocmd.tf-24.15 {chan write, EAGAIN means that writing is not allowed at thi
} -cleanup {
rename foo {}
unset res
+ update
} -result {{write rc* ABC} {watch rc* write} {}} \
-constraints {testchannel testthread}
+test iocmd.tf-24.16 {chan write, note the background flush setup by close due to the EAGAIN leaving data in buffers.} -match glob -setup {
+ set res {}
+ proc foo {args} {
+ oninit; onfinal; track
+ # Note: The EAGAIN signals that the channel cannot accept
+ # write requests right now, this in turn causes the IO core to
+ # request the generation of writable events (see expected
+ # result below, and compare to case 24.14 above).
+ error EAGAIN
+ }
+ set c [chan create {r w} foo]
+} -body {
+ notes [inthread $c {
+ note [puts -nonewline $c ABC ; flush $c]
+ close $c
+ notes
+ } c]
+ # Replace handler with all-tracking one which doesn't error.
+ # This will tell us if a write-due-flush is there.
+ proc foo {args} { note BG ; track }
+ # Flush (sic!) the event-queue to capture the write from a
+ # BG-flush.
+ update
+ set res
+} -cleanup {
+ rename foo {}
+ unset res
+} -result {{write rc* ABC} {watch rc* write} {} BG {write rc* ABC}} \
+ -constraints {testchannel testthread}
+
# --- === *** ###########################
# method cgetall
diff --git a/tests/utf.test b/tests/utf.test
index 81385bb..64b5cd4 100644
--- a/tests/utf.test
+++ b/tests/utf.test
@@ -259,8 +259,9 @@ test utf-16.1 {Tcl_UniCharToLower, negative delta} {
string tolower aA
} aa
test utf-16.2 {Tcl_UniCharToLower, positive delta} {
- string tolower \u0178\u00ff
-} \u00ff\u00ff
+ string tolower \u0178\u00ff\uA78D
+} \u00ff\u00ff\u0265
+
test utf-17.1 {Tcl_UniCharToLower, no delta} {
string tolower !
} !