diff --git a/test-suite/tests/srfi-13.test b/test-suite/tests/srfi-13.test index b55472b75..4b64bbfe1 100644 --- a/test-suite/tests/srfi-13.test +++ b/test-suite/tests/srfi-13.test @@ -2,23 +2,23 @@ ;;;; Martin Grabmueller, 2001-05-07 ;;;; ;;;; Copyright (C) 2001 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 ;;;; the Free Software Foundation; either version 2, or (at your option) ;;;; any later version. -;;;; +;;;; ;;;; This program is distributed in the hope that it will be useful, ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;;; GNU General Public License for more details. -;;;; +;;;; ;;;; You should have received a copy of the GNU General Public License ;;;; along with this software; see the file COPYING. If not, write to ;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, ;;;; Boston, MA 02111-1307 USA -(use-modules (srfi srfi-13) (srfi srfi-14)) +(use-modules (srfi srfi-13) (srfi srfi-14) (test-suite lib)) ;;; This kludge is needed, because SRFI-13 redefines some bindings in ;;; the core. @@ -161,7 +161,7 @@ (string=? "bla|delim|fasel" (string-join '("bla" "fasel") "|delim|" 'infix))) - (pass-if-exception "empty list, strict infix" + (pass-if-exception "empty list, strict infix" exception:strict-infix-grammar (string-join '() "|delim|" 'strict-infix)) @@ -1010,3 +1010,14 @@ (pass-if "pred, start and end index" (string=? "" (string-delete ".foo.bar." char-alphabetic? 2 4)))) + +(with-test-prefix "string-map" + + (pass-if "constant" + (string=? "xxx" (string-map (lambda (c) #\x) "foo"))) + + (pass-if "identity" + (string=? "foo" (string-map identity "foo"))) + + (pass-if "upcase" + (string=? "FOO" (string-map char-upcase "foo"))))