source: trunk/abcl/t/without-use-cl.lisp

Last change on this file was 15482, checked in by Mark Evenson, 3 years ago

Test COMPILE-FILE/LOAD machinery in pathological situations

File size: 845 bytes
Line 
1(in-package :cl-user)
2
3(prove:plan 1)
4(prove:ok
5 (let ((*package* (defpackage :without-use-cl)))
6   (cl:load (cl:compile-file
7             (asdf:system-relative-pathname :abcl
8                                            "t/eg/without-use-cl.lisp")))
9   "Compiling in a package without a (:USE :CL) clause"))
10
11(prove:plan 1)
12(let ((source (make-pathname :type "lisp"
13                             :defaults (uiop:with-temporary-file (:pathname o) o))))
14  (with-open-file (o source :direction :output :if-exists :supersede)
15    (write '(cl:format cl:t "~&I am in package ~s.~%" cl:*package*) :stream o))
16  (let ((output (compile-file source)))
17    (prove:ok 
18     (let ((*package* (defpackage :without-use-cl)))
19       (cl:load cl-user::output))
20     "Loading a fasl from a package without a (:USE :CL) clause.")))
21
22(prove:finalize)
23
24
25           
Note: See TracBrowser for help on using the repository browser.