1 ;;;; srfi-88.test --- Test suite for SRFI-88 -*- Scheme -*-
2 ;;;; Ludovic Courtès <ludo@gnu.org>
4 ;;;; Copyright (C) 2008 Free Software Foundation, Inc.
6 ;;;; This library is free software; you can redistribute it and/or
7 ;;;; modify it under the terms of the GNU Lesser General Public
8 ;;;; License as published by the Free Software Foundation; either
9 ;;;; version 3 of the License, or (at your option) any later version.
11 ;;;; This library is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 ;;;; Lesser General Public License for more details.
16 ;;;; You should have received a copy of the GNU Lesser General Public
17 ;;;; License along with this library; if not, write to the Free Software
18 ;;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 (define-module (test-srfi-88)
21 :use-module (test-suite lib)
22 :use-module (srfi srfi-88))
25 ;; Most of the test cases are taken from SRFI-88.
27 (with-test-prefix "srfi-88"
29 (pass-if "cond-expand"
30 (cond-expand (srfi-88 #t)
38 (keyword? (car '(a: b:)))
39 (not (keyword? "bar"))))
41 (pass-if "keyword->string"
42 (and (string=? (keyword->string foo:) "foo")
44 (keyword->string (string->keyword "a b c")))))
46 (pass-if "string->keyword"
47 (eq? (string->keyword "foo") foo:))
49 (pass-if "empty keyword"
50 ;; XXX: We don't currently support syntax of the form
51 ;; `#{extended symbol}#:'.
53 (keyword->string (string->keyword "")))))