tests: add a test for an important corner case

In case that someone wants to store the definition when compiling the file, we
need to make sure that the compiler does not error if it has unreadable objects.
This commit is contained in:
Daniel Kochmański 2025-03-19 09:44:01 +01:00
parent f56b2b9192
commit c9c5323578

View file

@ -2528,3 +2528,12 @@
(is (equal (funcall (funcall f0)) '((1 2 3) . 42)))
(is (equal (funcall (funcall f1)) '((1 2 3) . 42)))
(is (equal (funcall (funcall f2)) '((1 2 3) . 42)))))
;;; When we compile a file it is sometimes not possible to store all definitions
;;; readably. Make sure that the compiler does not error in such cases.
(deftest cmp.0107.unreadable-definition ()
(finishes
(with-compiler ("unreadable-definition.lsp")
'(macrolet ((def-it (name)
`(defun test () ,(find-package name))))
(def-it "COMMON-LISP")))))