test-mutual-redefinition.script 1.29 KB
Newer Older
1 2 3 4
;;-*- Lisp -*-

(load-system 'test-mutual-redefinition-1)
(defun current-system-source-file (x)
5
  (system-source-file (asdf::registered-system x)))
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33

(with-asdf-cache ()
  (DBG "loading test-mutual-redefinition-1")
  (assert-pathname-equal
   (test-source "test-mutual-redefinition-1.asd")
   (current-system-source-file "test-mutual-redefinition-1"))
  (assert-pathname-equal
   (test-source "test-mutual-redefinition-1.asd")
   (current-system-source-file "test-mutual-redefinition-2"))

  (DBG "loading test-mutual-redefinition-2 in the same cache session")
  (load-system 'test-mutual-redefinition-2)
  (assert-pathname-equal
   (test-source "test-mutual-redefinition-1.asd")
   (current-system-source-file "test-mutual-redefinition-1"))
  (assert-pathname-equal
   (test-source "test-mutual-redefinition-1.asd")
   (current-system-source-file "test-mutual-redefinition-2"))

  (with-asdf-cache (:override t)
    (DBG "loading test-mutual-redefinition-2 in a different cache session")
    (load-system 'test-mutual-redefinition-2)
    (assert-pathname-equal
     (test-source "test-mutual-redefinition-2.asd")
     (current-system-source-file "test-mutual-redefinition-1"))
    (assert-pathname-equal
     (test-source "test-mutual-redefinition-2.asd")
     (current-system-source-file "test-mutual-redefinition-2"))))