Posted to tcl by rmax at Thu Aug 04 07:45:21 GMT 2022view pretty
lassign [chan pipe] r w chan configure $r -blocking 0 -translation binary chan configure $w -buffering line -translation crlf -buffersize 8 puts $w xxxxxxx set data [read $r 10] switch -- $data { "xxxxxxx\r" {puts "reproduced the bug"} "xxxxxxx\r\n" {puts "bug fixed"} default {puts "unexpected result"} }