diff options
author | Michael Gran <spk121@yahoo.com> | 2009-08-12 09:21:37 -0700 |
---|---|---|
committer | Michael Gran <spk121@yahoo.com> | 2009-08-12 09:21:37 -0700 |
commit | 3c7cf7f5c04bf93222c133d5939badd75e627f6e (patch) | |
tree | 4b735518a20b3b3f22408d562bbf092746c92c0c /test-suite/tests | |
parent | bd4911efd239a0a09d3deb5c8dec0b727fff86ef (diff) | |
download | guile-3c7cf7f5c04bf93222c133d5939badd75e627f6e.tar.gz |
Regression, scm_string fails to test for circular lists
* libguile/string.c (scm_string): Restores the functionality
where scm_string tests for circular lists
* test-suite/tests/strings.test: add test for circular lists
Diffstat (limited to 'test-suite/tests')
-rw-r--r-- | test-suite/tests/strings.test | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test-suite/tests/strings.test b/test-suite/tests/strings.test index d82a4723d..a35dd20d8 100644 --- a/test-suite/tests/strings.test +++ b/test-suite/tests/strings.test @@ -447,7 +447,17 @@ (string-set! s 4 (integer->char #x010300)) (char=? (string-ref s 4) (integer->char #x010300))))) - +;; +;; list->string +;; +(with-test-prefix "string" + + (pass-if-exception "convert circular list to string" + exception:wrong-type-arg + (let ((foo (list #\a #\b #\c))) + (set-cdr! (cddr foo) (cdr foo)) + (apply string foo)))) + (with-test-prefix "string-split" ;; in guile 1.6.7 and earlier, character >=128 wasn't matched in the string |