Make `weaks.test' slightly more robust.
authorLudovic Courtès <ludo@gnu.org>
Mon, 28 Sep 2009 21:27:53 +0000 (23:27 +0200)
committerLudovic Courtès <ludo@gnu.org>
Mon, 28 Sep 2009 21:32:34 +0000 (23:32 +0200)
* test-suite/tests/weaks.test (global-weak): Use `string-copy' on all
  the keys, in case one of them is retained in `scm_source_whash' or
  similar.

test-suite/tests/weaks.test

index b469887..b39d2e7 100644 (file)
@@ -1,5 +1,5 @@
 ;;;; weaks.test --- tests guile's weaks     -*- scheme -*-
-;;;; Copyright (C) 1999, 2001, 2003, 2006 Free Software Foundation, Inc.
+;;;; Copyright (C) 1999, 2001, 2003, 2006, 2009 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
 
 (define global-weak (make-weak-vector 10 #f))
 (begin
-  (vector-set! global-weak 0 "string")
-  (vector-set! global-weak 1 "beans")
-  (vector-set! global-weak 2 "to")
-  (vector-set! global-weak 3 "utah")
-  (vector-set! global-weak 4 "yum yum")
+  (vector-set! global-weak 0 (string-copy "string"))
+  (vector-set! global-weak 1 (string-copy "beans"))
+  (vector-set! global-weak 2 (string-copy "to"))
+  (vector-set! global-weak 3 (string-copy "utah"))
+  (vector-set! global-weak 4 (string-copy "yum yum"))
   (gc))
 
 ;;; Normal weak vectors