X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcharacter.pure.lisp;h=74619b4795d46bb1a8e36f609dd6a705eb4a869e;hb=f846a7a310d630cf538811959916492a28a75fb1;hp=cc6f397bea9592242d1da0f774b757e336e79e37;hpb=898ced2a4d1f2503f3447f6408ddf5b05a906261;p=sbcl.git diff --git a/tests/character.pure.lisp b/tests/character.pure.lisp index cc6f397..74619b4 100644 --- a/tests/character.pure.lisp +++ b/tests/character.pure.lisp @@ -1,4 +1,4 @@ -;;;; various CHARACTER tests without side-effects +;;;; various CHARACTER tests without side effects ;;;; This software is part of the SBCL system. See the README file for ;;;; more information. @@ -35,3 +35,29 @@ (assert (characterp named-char)) (let ((coded-char-name (char-name coded-char))) (assert (string= name coded-char-name)))))) + +;;; bug 230: CHAR= didn't check types of &REST arguments +(dolist (form '((code-char char-code-limit) + (standard-char-p "a") + (graphic-char-p "a") + (alpha-char-p "a") + (upper-case-p "a") + (lower-case-p "a") + (both-case-p "a") + (digit-char-p "a") + (alphanumericp "a") + (char= #\a "a") + (char/= #\a "a") + (char< #\a #\b "c") + (char-equal #\a #\a "b") + (digit-char -1) + (digit-char 4 1) + (digit-char 4 37))) + (assert (raises-error? (apply (car form) (mapcar 'eval (cdr form))) type-error))) + +(dotimes (i 256) + (let* ((char (code-char i)) + (graphicp (graphic-char-p char)) + (name (char-name char))) + (unless graphicp + (assert name))))