Commit 84ac52cd authored by Robert Goldman's avatar Robert Goldman

New test for OPERATION-DONE-P modification.

New test verifies that if operation-done-p is "wired" to always return
NIL, then files will always be recompiled and reloaded.

Created to address Gitlab issue 13:
asdf/asdf#13
parent 4fba7148
;;; -*- mode: common-lisp; -*-
(DBG "Verify that system loads correctly at first.")
(load-system "test-operation-done-p")
(assert (find-package :test-package))
(assert (and (symbol-value (find-symbol* '*file1* :test-package))
(symbol-value (find-symbol* '*file2* :test-package))))
(assert-equal (symbol-value (find-symbol* '*f2c* :test-package)) 1)
(DBG "System successfully loaded: modifying defined variables")
(setf (symbol-value (find-symbol* '*file1* :test-package)) nil)
(setf (symbol-value (find-symbol* '*file2* :test-package)) nil)
(setf (symbol-value (find-symbol* '*f2c* :test-package)) 0)
(assert (not (or (symbol-value (find-symbol* '*file1* :test-package))
(symbol-value (find-symbol* '*file2* :test-package)))))
(assert-equal (symbol-value (find-symbol* '*f2c* :test-package)) 0)
(DBG "Reloading system")
(load-system "test-operation-done-p")
(assert (and (symbol-value (find-symbol* '*file1* :test-package))
(symbol-value (find-symbol* '*file2* :test-package))))
(assert-equal (symbol-value (find-symbol* '*f2c* :test-package)) 1)
(DBG "Reloading system re-established values")
(defclass never-done (cl-source-file)
())
(defmethod operation-done-p ((op load-op) (c never-done))
NIL)
(defmethod operation-done-p ((op compile-op) (c never-done))
NIL)
(defsystem "test-operation-done-p"
:serial t
:default-component-class never-done
:components
((:file "file1")
(:file "file2")))
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