]> git.donarmstrong.com Git - lilypond.git/blob - guile18/test-suite/tests/chars.test
Import guile-1.8 as multiple upstream tarball component
[lilypond.git] / guile18 / test-suite / tests / chars.test
1 ;;;; chars.test --- test suite for Guile's char functions    -*- scheme -*-
2 ;;;; Greg J. Badros <gjb@cs.washington.edu>
3 ;;;;
4 ;;;;    Copyright (C) 2000, 2006 Free Software Foundation, Inc.
5 ;;;; 
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.
10 ;;;; 
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.
15 ;;;; 
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
20
21
22 (use-modules (test-suite lib))
23
24 (define exception:wrong-type-to-apply
25   (cons 'misc-error "^Wrong type to apply:"))
26
27
28 (with-test-prefix "basic char handling"
29
30   (with-test-prefix "evaluator"
31
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)))))
37
38 (pass-if "char-is-both? works"
39          (and
40           (not (char-is-both? #\?))
41           (not (char-is-both? #\newline))
42           (char-is-both? #\a)
43           (char-is-both? #\Z)
44           (not (char-is-both? #\1))))
45