summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test-suite/tests/reader.test9
1 files changed, 8 insertions, 1 deletions
diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
index 0b13cf1c0..b068c716d 100644
--- a/test-suite/tests/reader.test
+++ b/test-suite/tests/reader.test
@@ -88,7 +88,14 @@
(pass-if "CR recognized as a token delimiter"
;; In 1.8.3, character 0x0d was not recognized as a delimiter.
- (equal? (read-string "one\x0dtwo") 'one)))
+ (equal? (read-string "one\x0dtwo") 'one))
+
+ (pass-if "returned strings are mutable"
+ ;; Per R5RS Section 3.4, "Storage Model", `read' is supposed to return
+ ;; mutable objects.
+ (let ((str (with-input-from-string "\"hello, world\"" read)))
+ (string-set! str 0 #\H)
+ (string=? str "Hello, world"))))
(pass-if-exception "radix passed to number->string can't be zero"