Posted to tcl by miguel at Thu Nov 05 14:56:57 GMT 2015view raw
- ==== chan-io-49.1 testing crlf reading, leftover cr disgorgment FAILED
- ==== Contents of test case:
- set f [open $path(test1) w]
- chan configure $f -translation lf
- chan puts -nonewline $f "a\rb\rc\r\n"
- chan close $f
- set f [open $path(test1) r]
- lappend l [file size $path(test1)]
- chan configure $f -translation crlf
- lappend l [chan read $f 1]
- lappend l [chan tell $f]
- lappend l [chan read $f 1]
- lappend l [chan tell $f]
- lappend l [chan read $f 1]
- lappend l [chan tell $f]
- lappend l [chan read $f 1]
- lappend l [chan tell $f]
- lappend l [chan read $f 1]
- lappend l [chan tell $f]
- lappend l [chan read $f 1]
- lappend l [chan tell $f]
- lappend l [chan eof $f]
- lappend l [chan read $f 1]
- lappend l [chan eof $f]
- ---- Result was:
- 7 a 1 {
- } 2 b 3 {
- } 4 c 5 {
- } 7 0 {} 1
- ---- Result should have been (exact matching):
- 7 a 1 {
- } 2 b 3
- set f1 [open $path(test1) w+]
- lappend l [chan configure $f1 -eofchar]
- chan configure $f1 -eofchar {ON GO}
- lappend l [chan configure $f1 -eofchar]
- chan configure $f1 -eofchar D
- lappend l [chan configure $f1 -eofchar]
- 4 c 5 {
- } 7 0 {} 1
- ==== chan-io-49.1 FAILED
Comments
Posted by mig at Thu Nov 05 15:14:37 GMT 2015 [text] [code]
The "result was" is perfectly correct, the "should have been" is corrupted. Those wrong lines in the "should have been" are actually the constraints in test chan-io.39.21