1
;;;; chars.test --- test suite for Guile's char functions -*- scheme -*-
2
;;;; Greg J. Badros <gjb@cs.washington.edu>
4
;;;; Copyright (C) 2000, 2006 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
22
(use-modules (test-suite lib))
24
(define exception:wrong-type-to-apply
25
(cons 'misc-error "^Wrong type to apply:"))
28
(with-test-prefix "basic char handling"
30
(with-test-prefix "evaluator"
32
;; The following test makes sure that the evaluator distinguishes between
33
;; evaluator-internal instruction codes and characters.
34
(pass-if-exception "evaluating chars"
35
exception:wrong-type-to-apply
36
(eval '(#\0) (interaction-environment)))))
38
(pass-if "char-is-both? works"
40
(not (char-is-both? #\?))
41
(not (char-is-both? #\newline))
44
(not (char-is-both? #\1))))