fix bug in c53c29d9
This commit is contained in:
parent
5fca59e2ed
commit
0083f1c9ae
|
@ -2893,7 +2893,7 @@
|
|||
[else
|
||||
(define leftovers (subbytes the-bytes src-read-amt (bytes-length the-bytes)))
|
||||
(at-enqueue (cons leftovers key) remainder-re-enqueued)]))
|
||||
(define converted-str (bytes->string/utf-8 (subbytes the-bytes 0 src-read-amt)))
|
||||
(define converted-str (bytes->string/utf-8 converted-bytes))
|
||||
(values (reverse (cons (cons converted-str key) acc))
|
||||
new-at-queue
|
||||
too-many-bytes?)]
|
||||
|
|
|
@ -397,6 +397,25 @@
|
|||
(void (write-bytes ,(subbytes bts 1 (bytes-length bts)) p))
|
||||
(flush-output p)
|
||||
(send t get-text))))))
|
||||
|
||||
(let ([b (bytes 195 195 (char->integer #\a))])
|
||||
(test
|
||||
'text:ports%.broken-encoding
|
||||
(λ (x)
|
||||
(define c (bytes-open-converter "UTF-8-permissive" "UTF-8"))
|
||||
(define-values (result-bytes src-read-amt termination) (bytes-convert c b))
|
||||
(equal? x (bytes->string/utf-8 result-bytes)))
|
||||
(λ ()
|
||||
(queue-sexp-to-mred
|
||||
`(let ()
|
||||
(define t (new (text:ports-mixin text:wide-snip%)))
|
||||
(define p (send t get-out-port))
|
||||
(yield
|
||||
(thread
|
||||
(λ ()
|
||||
(write-bytes ,b p)
|
||||
(flush-output p))))
|
||||
(send t get-text))))))
|
||||
|
||||
|
||||
;; the next tests test the interaction when the current
|
||||
|
|
Loading…
Reference in New Issue
Block a user