;;;; srfi-13.test --- Test suite for Guile's SRFI-13 functions. -*- scheme -*-
;;;; Martin Grabmueller, 2001-05-07
;;;;
-;;;; Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+;;;; Copyright (C) 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
(= 1 (string-index "foo bar" char-alphabetic? 1 6)))
(pass-if "non-empty - pred - no match - start and end index"
- (not (string-index "frobnicate" char-numeric? 2 5))))
+ (not (string-index "frobnicate" char-numeric? 2 5)))
+
+ ;; in guile 1.6.7 and earlier this resulted in a segv, because
+ ;; SCM_MAKE_CHAR didn't cope with "signed char" arguments containing an
+ ;; 8-bit value
+ (pass-if "8-bit char in string"
+ (begin
+ (string-index (string (integer->char 200)) char-numeric?)
+ #t)))
(with-test-prefix "string-index-right"