0.8.4.20
[sbcl.git] / tests / character.pure.lisp
index cc6f397..97a2590 100644 (file)
@@ -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.
       (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)))