fixed bug in writing strings containing #\x85; and #\x2028;.
This commit is contained in:
parent
e10ea87a31
commit
5a2de815cb
|
@ -324,7 +324,9 @@
|
||||||
(write-char c p)]
|
(write-char c p)]
|
||||||
[(fx< b 127)
|
[(fx< b 127)
|
||||||
(write-char c p)]
|
(write-char c p)]
|
||||||
[(print-unicode)
|
[(or (fx= b #x85) (fx= b #x2028))
|
||||||
|
(write-inline-hex b p)]
|
||||||
|
[(print-unicode)
|
||||||
(write-char c p)]
|
(write-char c p)]
|
||||||
[else
|
[else
|
||||||
(write-inline-hex b p)]))
|
(write-inline-hex b p)]))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1860
|
1861
|
||||||
|
|
|
@ -101,9 +101,19 @@
|
||||||
|
|
||||||
|
|
||||||
(define (run-tests)
|
(define (run-tests)
|
||||||
|
(define (rw? x1)
|
||||||
|
(let ([str (let-values ([(p e) (open-string-output-port)])
|
||||||
|
(write x1 p)
|
||||||
|
(e))])
|
||||||
|
(let ([x2 (read (open-string-input-port str))])
|
||||||
|
(equal? x1 x2))))
|
||||||
|
(assert (rw? " \x85; "))
|
||||||
|
(assert (rw? " \x2028; "))
|
||||||
|
|
||||||
(test-char-syntax)
|
(test-char-syntax)
|
||||||
(test-reader))
|
(test-reader))
|
||||||
|
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue