246 |
(not (standard-char-p x)))) |
(not (standard-char-p x)))) |
247 |
t) |
t) |
248 |
|
|
249 |
(deftest standard-char-p.2 |
(deftest standard-char-p.2a |
250 |
(loop for i from 0 below (min 65536 char-code-limit) |
(loop for i from 0 below (min 65536 char-code-limit) |
251 |
for x = (code-char i) |
for x = (code-char i) |
252 |
always (or (not (characterp x)) |
always (or (not (characterp x)) |
438 |
(string= (char-name #\Newline) "Newline") |
(string= (char-name #\Newline) "Newline") |
439 |
t) |
t) |
440 |
|
|
441 |
|
;;; Check that the names of various semi-standard characters are |
442 |
|
;;; appropriate. This is complicated by the possibility that two different |
443 |
|
;;; names may refer to the same character (as is allowed by the standard, |
444 |
|
;;; for example in the case of Newline and Linefeed). |
445 |
|
|
446 |
(deftest char-name.4 |
(deftest char-name.4 |
447 |
(loop for s in '("Rubout" "Page" "Backspace" "Return" "Tab" "Linefeed") |
(loop for s in '("Rubout" "Page" "Backspace" "Return" "Tab" "Linefeed") |
448 |
for c = (name-char s) |
for c = (name-char s) |
449 |
unless (or (not c) (string= (char-name c) s)) |
unless (or (not c) |
450 |
|
;; If the char-name is not even string-equal, |
451 |
|
;; assume we're sharing the character with some other |
452 |
|
;; name, and assume it's ok |
453 |
|
(not (string-equal (char-name c) s)) |
454 |
|
(string= (char-name c) s)) |
455 |
|
;; Collect list of cases that failed |
456 |
collect (list s c (char-name c))) |
collect (list s c (char-name c))) |
457 |
nil) |
nil) |
458 |
|
|