diff options
author | oehhar <harald.oehlmann@elmicron.de> | 2022-09-09 14:01:14 (GMT) |
---|---|---|
committer | oehhar <harald.oehlmann@elmicron.de> | 2022-09-09 14:01:14 (GMT) |
commit | c6e1d19c9ea94f99859cc684c83ac6ff42d5aac4 (patch) | |
tree | 465b9ed808de8482fb59c2c221b5358ab387a6fd | |
parent | e1b9a033d74009b6b57c6a65fe10473cd96a67dc (diff) | |
parent | fc474844a77a1f8a4fbde6335d9fe57e0166f7a3 (diff) | |
download | tcl-c6e1d19c9ea94f99859cc684c83ac6ff42d5aac4.zip tcl-c6e1d19c9ea94f99859cc684c83ac6ff42d5aac4.tar.gz tcl-c6e1d19c9ea94f99859cc684c83ac6ff42d5aac4.tar.bz2 |
Ticket [6978c01b65]: add file encoding tests which should fail. As they don't fail jet, they are marked as "knownBug".
-rw-r--r-- | doc/after.n | 4 | ||||
-rw-r--r-- | tests/io.test | 26 |
2 files changed, 30 insertions, 0 deletions
diff --git a/doc/after.n b/doc/after.n index 3d0d2c4..1a814e0 100644 --- a/doc/after.n +++ b/doc/after.n @@ -33,6 +33,7 @@ depending on the first argument to the command: \fBafter \fIms\fR . \fIMs\fR must be an integer giving a time in milliseconds. +A negative number is treated as 0. The command sleeps for \fIms\fR milliseconds and then returns. While the command is sleeping the application does not respond to events. @@ -52,6 +53,9 @@ the background error will be reported by the command registered with \fBinterp bgerror\fR. The \fBafter\fR command returns an identifier that can be used to cancel the delayed command using \fBafter cancel\fR. +A \fIms\fR value of 0 (or negative) queues the event immediately with +priority over other event types (if not installed withn an event proc, +which will wait for next round of events). .TP \fBafter cancel \fIid\fR . diff --git a/tests/io.test b/tests/io.test index 6314ace..358fc11 100644 --- a/tests/io.test +++ b/tests/io.test @@ -8952,6 +8952,32 @@ test io-74.1 {[104f2885bb] improper cache validity check} -setup { removeFile io-74.1 } -returnCodes error -match glob -result {can not find channel named "*"} +test io-75.1 {multibyte encoding error read results in raw bytes} -setup { + set fn [makeFile {} io-75.1] + set f [open $fn w+] + fconfigure $f -encoding binary + puts -nonewline $f "A\xC0\x40" + flush $f + seek $f 0 + fconfigure $f -encoding utf-8 -buffering none +} -constraints knownBug -body { + read $f +} -cleanup { + close $f + removeFile io-75.1 +} -returnCodes error + +test io-75.2 {unrepresentable character write passes and is replaced by ?} -setup { + set fn [makeFile {} io-75.2] + set f [open $fn w+] + fconfigure $f -encoding iso8859-1 +} -constraints knownBug -body { + puts -nonewline $f "A\u2022" +} -cleanup { + close $f + removeFile io-75.2 +} -returnCodes error + # ### ### ### ######### ######### ######### # cleanup |