X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcharacters.lisp;h=1528006aeac28995432ffeab8f73fa1162ce0eb8;hb=8d57a74774a94181500916657014cfdd3525a238;hp=975f35859239864a06aced51ec37b35ca8389010;hpb=a38d48850754e354abe9c99848a087bfd7062214;p=jscl.git diff --git a/tests/characters.lisp b/tests/characters.lisp index 975f358..1528006 100644 --- a/tests/characters.lisp +++ b/tests/characters.lisp @@ -94,6 +94,17 @@ ;; CHAR-CODE-LIMIT (test (< 95 char-code-limit 10000000)) -;; TODO: CHAR-NAME - -;; TODO: NAME-CHAR +;; CHAR-NAME +(test (string= "Space" (char-name #\ ))) +;; (test (string= "Space" (char-name #\Space))) +(test (string= "Page" (char-name (code-char 12)))) ;; #\Page +(test (string= "LATIN_SMALL_LETTER_A" (char-name #\a))) +(test (string= "LATIN_CAPITAL_LETTER_A" (char-name #\A))) + +;; NAME-CHAR +(test (char= #\ (name-char 'space))) ;; should be: #\Space +(test (char= #\ (name-char "space"))) ;; #\Space +(test (char= #\ (name-char "Space"))) ;; #\Space +(test + (let ((x (char-name #\a))) + (or (not x) (eql (name-char x) #\a))))