Skip to content
Snippets Groups Projects
test-module-depend.script 874 B
Newer Older
;;; -*- Lisp -*-
(load "script-support")

(quit-on-error
 (setf asdf:*central-registry* '(*default-pathname-defaults*))
 (asdf:operate 'asdf:load-op 'test-module-depend)

 ;; test that it compiled
 (defvar file1-date (file-write-date (asdf:compile-file-pathname* "file1")))

 (assert (and file1-date (file-write-date (asdf:compile-file-pathname* "file2"))))

 ;; and loaded
 (assert (eval (intern (symbol-name '#:*file1*) :test-package)))


 ;; now touch file1 and check that file2 _is_ also recompiled
 ;; this will only work if the cross-module (intra-system)
 ;; dependency bug is fixed.

 (let ((before (file-write-date (asdf:compile-file-pathname* "file2"))))
   (asdf::run-shell-command "touch file1.lisp")
   (sleep 1)
   (asdf:operate 'asdf:load-op 'test-module-depend)
   (assert (>  (file-write-date (asdf:compile-file-pathname* "file2")) before))))