Commit 81134efb authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

New test for cache correctness.

It seems that the cache may override the error flag for FIND-SYSTEM.
parent b90d556a
Loading
Loading
Loading
Loading

test/test-cache.script

0 → 100644
+35 −0
Original line number Diff line number Diff line
;;; -*- Lisp -*-

;;; test to check that the cache doesn't upset error signaling from FIND-SYSTEM


(in-package asdf-test)

(defparameter *all-systems*
  (list
   "test-asdf"
   "test-asdf/all"
   "test-asdf/1"
   "test-asdf/2"
   "test-asdf/4"
   "test-asdf/test9-1"
   "test-asdf/test-module-depend"
   "test-asdf/test9-2"
   "test-asdf/test9-3"
   "test-asdf/test-source-directory-1"
   "test-asdf/test-source-directory-2"
   "test-asdf/bundle-1"
   "test-asdf/bundle-2"
   "test-asdf/force"
   "test-asdf/force1"))

(defun clear-caches-and-search ()
  (setf asdf:*central-registry* nil)
  (mapc #'asdf/find-system:clear-defined-system *all-systems*))

(clear-caches-and-search)
(assert (not (asdf:find-system "test-asdf/force1" nil)))
(multiple-value-bind (ret cond)
    (ignore-errors (asdf:find-system "test-asdf/force1" t))
  (assert (not ret))
  (assert (typep cond 'asdf:missing-component)))