Commit 4f763571 authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Add regression test for syntax-control

parent 72c626da
(defsystem "test-quasiquote" :components ((:file "test-quasiquote")))
(in-package :cl-user)
(defparameter *quine*
'((LAMBDA (X) (LIST X `',X)) '(LAMBDA (X) (LIST X `',X))))
;; Interestingly, at least on SBCL, this assertion does not hold:
#-(or sbcl) (assert (equal *quine* (eval *quine*)))
(assert (equal (write-to-string *quine*)
(write-to-string (eval *quine*))))
(assert (equal (eval *quine*)
(eval (eval *quine*))))
;;-*- Lisp -*-
;; Testing that ASDF builds with a controlled syntax
;; when invoked with readtable different from the initial/shared readtable.
(in-package :asdf-test)
;; Simple stuff
(setf *central-registry* (list (subpathname *test-directory* "syntax-control/")))
;; Try to load lisp-invocation from ext/ or from the user environment.
(:directory ,*asdf-directory*)
(:directory (,*asdf-directory* "uiop/"))
(:tree (,*asdf-directory* "ext/"))
(DBG "Run test-quasiquote. Should be using the system's quasiquote.")
(asdf:load-system :test-quasiquote :force t)
(DBG "Run test-quasiquote. Should STILL be using the system's quasiquote.")
(load-system :fare-quasiquote-readtable)
(named-readtables:in-readtable :fare-quasiquote)
(asdf:load-system :test-quasiquote :force t)
(DBG "Run the previously compiled test-quasiquote. If it used fare-quasiquote, it will fail.")
(delete-package :fare-quasiquote)
(asdf:load-system :test-quasiquote)
Markdown is supported
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