Commit fcbb7d6f authored by Michał Herda's avatar Michał Herda 🤔
Browse files


This fixes the symbol-interning issues that might have occured when `READ-FROM-STRING`
was internally called in the wrong package.

This also fixes the fact that the test names had no home package.
parent ed4a6bd6
......@@ -58,18 +58,19 @@
;; readtable-case reading
(symbol-macrolet ((lookup-table
'(:SYMBOL ("zebra" "Zebra" "ZEBRA" "zebr\\a" "zebr\\A" "ZEBR\\a" "ZEBR\\A" "Zebr\\a" "Zebr\\A")
:DOWNCASE (|zebra| |zebra| |zebra| |zebra| |zebrA| |zebra| |zebrA| |zebra| |zebrA|)
:PRESERVE (|zebra| |Zebra| |ZEBRA| |zebra| |zebrA| |ZEBRa| |ZEBRA| |Zebra| |ZebrA|)
:INVERT (|ZEBRA| |Zebra| |zebra| |ZEBRa| |ZEBRA| |zebra| |zebrA| |Zebra| |ZebrA|))))
:DOWNCASE ("zebra" "zebra" "zebra" "zebra" "zebrA" "zebra" "zebrA" "zebra" "zebrA")
:PRESERVE ("zebra" "Zebra" "ZEBRA" "zebra" "zebrA" "ZEBRa" "ZEBRA" "Zebra" "ZebrA")
:INVERT ("ZEBRA" "Zebra" "zebra" "ZEBRa" "ZEBRA" "zebra" "zebrA" "Zebra" "ZebrA"))))
((def-readtable-case-test (reader-case)
`(deftest ,(make-symbol (concatenate 'string "READTABLE-CASE.CASE-"
(symbol-name reader-case)))
`(deftest ,(intern (concatenate 'string "READTABLE-CASE.CASE-"
(symbol-name reader-case))
(find-package :cl-test))
(let ((*readtable* (copy-readtable)))
(setf (readtable-case *readtable*) ,reader-case)
(mapcar #'(lambda (x)
(read-from-string x))
(symbol-name (read-from-string x)))
',(getf lookup-table :symbol)))
,(getf lookup-table reader-case))))
(def-readtable-case-test :upcase)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment