From 2834ac46ace62c489b3f1eaf15d5bb2d0ae38b3e Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Sat, 30 Apr 2005 00:36:52 +0000 Subject: [PATCH] Fixed up possible bug in baskslash syntax tests --- ansi-tests/syntax.lsp | 63 ++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/ansi-tests/syntax.lsp b/ansi-tests/syntax.lsp index 5e7d0b69..a1aad13d 100644 --- a/ansi-tests/syntax.lsp +++ b/ansi-tests/syntax.lsp @@ -239,41 +239,50 @@ (def-syntax-test syntax.sharp-backslash.5 (flet ((%f (s) (read-from-string (concatenate 'string "#\\" s)))) - (loop for c across +standard-chars+ - for name = (char-name c) - unless (or (null name) - (and (eql (%f name) c) - (eql (%f (string-downcase name)) c) - (eql (%f (string-upcase name)) c) - (eql (%f (string-capitalize name)) c))) - collect (list c name))) + (let ((good-chars (concatenate 'string +alphanumeric-chars+ + "<,.>\"':/?[]{}~`!@#$%^&*_-+="))) + (loop for c across +standard-chars+ + for name = (char-name c) + unless (or (null name) + (string/= "" (string-trim good-chars name)) + (and (eql (%f name) c) + (eql (%f (string-downcase name)) c) + (eql (%f (string-upcase name)) c) + (eql (%f (string-capitalize name)) c))) + collect (list c name)))) nil) (def-syntax-test syntax.sharp-backslash.6 (flet ((%f (s) (read-from-string (concatenate 'string "#\\" s)))) - (loop for i below (min 65536 char-code-limit) - for c = (code-char i) - for name = (and c (char-name c)) - unless (or (null name) - (and (eql (%f name) c) - (eql (%f (string-downcase name)) c) - (eql (%f (string-upcase name)) c) - (eql (%f (string-capitalize name)) c))) - collect (list i c name))) + (let ((good-chars (concatenate 'string +alphanumeric-chars+ + "<,.>\"':/?[]{}~`!@#$%^&*_-+="))) + (loop for i below (min 65536 char-code-limit) + for c = (code-char i) + for name = (and c (char-name c)) + unless (or (null name) + (string/= "" (string-trim good-chars name)) + (and (eql (%f name) c) + (eql (%f (string-downcase name)) c) + (eql (%f (string-upcase name)) c) + (eql (%f (string-capitalize name)) c))) + collect (list i c name)))) nil) (def-syntax-test syntax.sharp-backslash.7 (flet ((%f (s) (read-from-string (concatenate 'string "#\\" s)))) - (loop for i = (random (min (ash 1 24) char-code-limit)) - for c = (code-char i) - for name = (and c (char-name c)) - repeat 1000 - unless (or (null name) - (and (eql (%f name) c) - (eql (%f (string-downcase name)) c) - (eql (%f (string-upcase name)) c) - (eql (%f (string-capitalize name)) c))) - collect (list i c name))) + (let ((good-chars (concatenate 'string +alphanumeric-chars+ + "<,.>\"':/?[]{}~`!@#$%^&*_-+="))) + (loop for i = (random (min (ash 1 24) char-code-limit)) + for c = (code-char i) + for name = (and c (char-name c)) + repeat 1000 + unless (or (null name) + (string/= "" (string-trim good-chars name)) + (and (eql (%f name) c) + (eql (%f (string-downcase name)) c) + (eql (%f (string-upcase name)) c) + (eql (%f (string-capitalize name)) c))) + collect (list i c name)))) nil) -- GitLab