From 4b4c97c750f21dec7531227ae810b87bf7f52ee3 Mon Sep 17 00:00:00 2001 From: Raymond Toy <toy.raymond@gmail.com> Date: Sun, 24 Jan 2021 09:31:10 -0800 Subject: [PATCH] Check for symbol length in character.1.body Cmucl converts a string to Unicode NFC form before creating a symbol. This means some symbols have names that longer than 1 character. The test assumes the name has one character which causes an error in cmucl. This just adds a check that the length is 1 before extracting the character from the symbol name. This doesn't change behavior of the test (which was already assuming a length of 1), but allows cmucl not to signal an error but to finish the test with a meaningful list of characters whose corresponding symbol name is more than one character long. A couple of minor tweaks: - Ignore sse2f fasl created by cmucl/x86. - Add comment to makefile on how to run with cmucl. --- auxiliary/char-aux.lsp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/auxiliary/char-aux.lsp b/auxiliary/char-aux.lsp index 67f059ff..0e39acb2 100644 --- a/auxiliary/char-aux.lsp +++ b/auxiliary/char-aux.lsp @@ -75,11 +75,13 @@ (defun character.1.body () (loop for i from 0 below (min 65536 char-code-limit) for c = (code-char i) unless (or (null c) - (let ((s (string c))) + (let* ((s (string c)) + (sym (make-symbol s))) (and (eqlt (character c) c) (eqlt (character s) c) - (eqlt (character (make-symbol s)) c)))) + (= 1 (length (symbol-name sym))) + (eqlt (character sym) c)))) collect (char-name c))) (defun character.2.body () -- GitLab