(string-split): Try splitting on an 8-bit char.
authorKevin Ryde <user42@zip.com.au>
Sun, 5 Jun 2005 21:33:33 +0000 (21:33 +0000)
committerKevin Ryde <user42@zip.com.au>
Sun, 5 Jun 2005 21:33:33 +0000 (21:33 +0000)
test-suite/tests/strings.test

index 296d741..7a2d40d 100644 (file)
@@ -1,7 +1,7 @@
 ;;;; strings.test --- test suite for Guile's string functions    -*- scheme -*-
 ;;;; Jim Blandy <jimb@red-bean.com> --- August 1999
 ;;;;
-;;;; Copyright (C) 1999, 2001, 2004 Free Software Foundation, Inc.
+;;;; Copyright (C) 1999, 2001, 2004, 2005 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
     exception:read-only-string
     (string-set! (substring/read-only "abc" 0) 1 #\space)))
 
+(with-test-prefix "string-split"
+
+  ;; in guile 1.6.7 and earlier, character >=128 wasn't matched in the string
+  (pass-if "char 255"
+    (equal? '("a" "b")
+           (string-split (string #\a (integer->char 255) #\b)
+                         (integer->char 255)))))
+
 (with-test-prefix "substring-move!"
 
   (pass-if-exception "substring-move! checks start and end correctly"