fixed bug in writing strings containing #\x85; and #\x2028;.
This commit is contained in:
parent
e10ea87a31
commit
5a2de815cb
|
@ -324,6 +324,8 @@
|
|||
(write-char c p)]
|
||||
[(fx< b 127)
|
||||
(write-char c p)]
|
||||
[(or (fx= b #x85) (fx= b #x2028))
|
||||
(write-inline-hex b p)]
|
||||
[(print-unicode)
|
||||
(write-char c p)]
|
||||
[else
|
||||
|
|
|
@ -1 +1 @@
|
|||
1860
|
||||
1861
|
||||
|
|
|
@ -101,9 +101,19 @@
|
|||
|
||||
|
||||
(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-reader))
|
||||
|
||||
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue