From e7cd4b6c33725e54abef46754f0fda2e2745bb6d Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 26 Apr 2014 12:40:42 +0900 Subject: [PATCH] 4 byte utf8 char tests. --- tests/r7rs-tests.scm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/r7rs-tests.scm b/tests/r7rs-tests.scm index 939a9621..184e25d2 100644 --- a/tests/r7rs-tests.scm +++ b/tests/r7rs-tests.scm @@ -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)