test-touch-system-1.script 821 Bytes
Newer Older
1 2 3 4 5 6
;;; -*- Lisp -*-

;;; test system def reloading if touched
;;; system that can be found using *system-definition-search-functions*

(load "script-support")
7 8
(load (compile-file-pathname "../asdf"))
(quit-on-error
9
 (flet ((system-load-time (name)
10 11 12
          (let ((data (asdf::system-registered-p name)))
            (when data
              (car data)))))
13 14 15
   (setf asdf:*central-registry* '(*default-pathname-defaults*))
   (asdf:find-system :test1)
   (let ((date1 (system-load-time :test1))
16
         (file (namestring (merge-pathnames "test1.asd"))))
17 18 19 20 21 22
     (assert date1)
     (assert file)
     (sleep 1)
     (asdf:run-shell-command "touch ~a" file)
     (asdf:find-system :test1)
     (let ((date2 (system-load-time :test1)))
23
       (print (list date1 date2))
24 25 26
       (assert date2)
       (assert (> date2 date1))))))