Commit 877cc0a3 authored by Robert P. Goldman's avatar Robert P. Goldman
Browse files

Draft of test.

parent 53589ba1
;;; -*- Lisp -*-
;;; test retrying finding location of an ASDF system.
(in-package asdf-test)
(defparameter *old-registry* asdf:*central-registry*)
;;(defparameter *search-table* (hash-table->alist asdf::*source-registry*))
;;(pprint *search-table*)
(assert (asdf:find-system "test-asdf/force1"))
(DBG "Clearing the caches and finding.")
(setf asdf:*central-registry* nil)
(asdf/find-system:clear-defined-system "test-asdf/force1")
(assert (not (asdf:find-system "test-asdf/force1" nil)))
(let (tried-once)
(lambda (c)
;; Nothing Quicklisp can do to recover from this, so
;; just resignal
(error c)))
(lambda (c)
(if (not tried-once)
(let ((missing (asdf::missing-requires c)))
(assert (equal missing "test-asdf/force1"))
(setf tried-once t)
(DBG "Trying to reset the central registry and retry.")
(setf asdf:*central-registry* *old-registry*)
(asdf:find-system missing))
;; avoid infinite looping
(error c)))))
(asdf:find-system "test-asdf/force1")))
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