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 program is free software; you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation; either version 2, or (at your option)
9 ;;;; any later version.
11 ;;;; This program 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
14 ;;;; GNU General Public License for more details.
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with this software; see the file COPYING. If not, write to
18 ;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 ;;;; Boston, MA 02110-1301 USA
21 (define-module (test-srfi-88)
22 :use-module (test-suite lib)
23 :use-module (srfi srfi-88))
26 ;; Most of the test cases are taken from SRFI-88.
28 (with-test-prefix "srfi-88"
30 (pass-if "cond-expand"
31 (cond-expand (srfi-88 #t)
39 (keyword? (car '(a: b:)))
40 (not (keyword? "bar"))))
42 (pass-if "keyword->string"
43 (and (string=? (keyword->string foo:) "foo")
45 (keyword->string (string->keyword "a b c")))))
47 (pass-if "string->keyword"
48 (eq? (string->keyword "foo") foo:))
50 (pass-if "empty keyword"
51 ;; XXX: We don't currently support syntax of the form
52 ;; `#{extended symbol}#:'.
54 (keyword->string (string->keyword "")))))