test-try-recompiling-1.script 686 Bytes
Newer Older
1 2 3 4
;;; -*- Lisp -*-

;;; test asdf:try-recompiling restart

5 6 7 8 9 10 11 12 13 14 15 16 17
(defparameter *caught-error* nil)

(delete-file-if-exists (test-fasl "try-recompiling-1"))

(handler-bind
    ((error (lambda (c)
              (setf *caught-error* t)
              (multiple-value-bind (name mode)
                  (find-symbol
                   (symbol-name 'try-recompiling)
                   :asdf)
                (assert (eq mode :external))
                (let ((restart (find-restart name c)))
18
                  ;;(DBG :foo c restart (compute-restarts c))
19 20 21
                  (when restart
                    (invoke-restart restart)))))))
  (oos 'load-op 'try-recompiling-1))
22

23
(assert *caught-error*)