fixed bug in writing strings containing #\x85; and #\x2028;.

This commit is contained in:
Abdulaziz Ghuloum 2009-10-16 19:15:17 +03:00
parent e10ea87a31
commit 5a2de815cb
3 changed files with 14 additions and 2 deletions

View File

@ -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

View File

@ -1 +1 @@
1860
1861

View File

@ -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))
)