summaryrefslogtreecommitdiff
path: root/tests/reader.impure.lisp
diff options
context:
space:
mode:
authorDouglas Katzman <dougk@google.com>2020-06-24 15:19:48 -0400
committerDouglas Katzman <dougk@google.com>2020-06-24 15:19:48 -0400
commita5d97a3decde842919cd1f025bc2ae5a5c964428 (patch)
treedfb1f623b1b194cde887396ba3214cdd94bad871 /tests/reader.impure.lisp
parent7bebe3387d6a7637b99454d86a38c62b6fde77ae (diff)
Prevent set-syntax-from-char from crashing remhash
Because the empty extended-char table is not a hash-table. But now it's OK to maphash over.
Diffstat (limited to 'tests/reader.impure.lisp')
-rw-r--r--tests/reader.impure.lisp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/reader.impure.lisp b/tests/reader.impure.lisp
index dcc3fa2b7..e9f4456eb 100644
--- a/tests/reader.impure.lisp
+++ b/tests/reader.impure.lisp
@@ -242,6 +242,10 @@
#+sb-unicode
(with-test (:name :unicode-dispatch-macros)
+ ;; Smoke test: (set-syntax-from-char unicode-char ordinary-constituent-char)
+ ;; should not fail
+ (set-syntax-from-char (code-char 300) #\a)
+ ;;
(let ((*readtable* (copy-readtable)))
(make-dispatch-macro-character (code-char #x266F)) ; musical sharp
(set-dispatch-macro-character
@@ -252,6 +256,9 @@
(let ((x (read-from-string
(map 'string #'code-char '(#x266F #x221E)))))
(assert (eq x :infinity))
+ ;; I don't know what this was testing, and it's "noisy". Can we fix that?
+ ;; I think we used to treat NIL as *removing* the macro function, which is not
+ ;; a specified action. But neither could NIL ever be a function designator.
(set-dispatch-macro-character (code-char #x266F) (code-char #x221E) nil)
(assert (zerop (hash-table-count
(cdr (sb-impl::%dispatch-macro-char-table