("string ports"): Copy string literal so that it can be modified.
authorMarius Vollmer <mvo@zagadka.de>
Wed, 22 Sep 2004 14:25:47 +0000 (14:25 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Wed, 22 Sep 2004 14:25:47 +0000 (14:25 +0000)
test-suite/tests/ports.test

index d134972..e9c1b90 100644 (file)
@@ -1,7 +1,7 @@
 ;;;; ports.test --- test suite for Guile I/O ports     -*- scheme -*-
 ;;;; Jim Blandy <jimb@red-bean.com> --- May 1999
 ;;;;
-;;;;   Copyright (C) 1999, 2001 Free Software Foundation, Inc.
+;;;;   Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This program is free software; you can redistribute it and/or modify
 ;;;; it under the terms of the GNU General Public License as published by
                                               (string-ref text 0))))))
 
   ;; seeking an output string.
-  (let* ((text "123456789")
+  (let* ((text (string-copy "123456789"))
         (len (string-length text))
         (result (call-with-output-string
                  (lambda (p)