1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 21:10:27 +02:00
guile/test-suite/tests/chars.test
Dirk Herrmann f5c6ec2fb0 * test-suite/tests/chars.test: Fixed test comment. The bug that
this test detects was actually introduced by my patch from
	2003-05-31.

	* libguile/eval.c: Partially undid my patch from 2003-05-31.  This
	patch caused the segfault referenced in the previous changelog
	entry.
2003-06-04 23:50:13 +00:00

45 lines
1.5 KiB
Scheme

;;;; chars.test --- test suite for Guile's char functions -*- scheme -*-
;;;; Greg J. Badros <gjb@cs.washington.edu>
;;;;
;;;; Copyright (C) 2000 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 (test-suite lib))
(define exception:wrong-type-to-apply
(cons 'misc-error "^Wrong type to apply:"))
(with-test-prefix "basic char handling"
(with-test-prefix "evaluator"
;; The following test makes sure that the evaluator distinguishes between
;; evaluator-internal instruction codes and characters.
(pass-if-exception "evaluating chars"
exception:wrong-type-to-apply
(eval '(#\0) (interaction-environment)))))
(pass-if "char-is-both? works"
(and
(not (char-is-both? #\?))
(not (char-is-both? #\newline))
(char-is-both? #\a)
(char-is-both? #\Z)
(not (char-is-both? #\1))))