4 byte utf8 char tests.

This commit is contained in:
Alex Shinn 2014-04-26 12:40:42 +09:00
parent 985deba95d
commit e7cd4b6c33

View file

@ -1763,6 +1763,18 @@
(test "abc" (read-string 3 (open-input-string "abcd")))
(test "abc" (read-string 3 (open-input-string "abc\ndef\n")))
(let* ((s (string #\x1F700 #\x1F701 #\x1F702))
(in (open-input-string s)))
(test #\x1F700 (string-ref s 0))
(test #\x1F701 (string-ref s 1))
(test #\x1F702 (string-ref s 2))
(let* ((c1 (read-char in))
(c2 (read-char in))
(c3 (read-char in)))
(test #\x1F700 c1)
(test #\x1F701 c2)
(test #\x1F702 c3)))
(test "abc"
(let ((out (open-output-string)))
(write 'abc out)