test-concatenate-source.script 1.36 KB
Newer Older
1
;;; -*- Lisp -*-
2 3 4 5 6 7 8 9 10 11 12 13 14 15

(def-test-system :test-concatenate-source
  :depends-on (:file3-only)
  :components
  ((:file "file2" :depends-on ("foo"))
   (:module "foo" :pathname ""
    :components ((:file "file1")
                 (:file "file4" :if-feature (:not :common-lisp))))))

(defparameter mcso (make-operation 'monolithic-concatenate-source-op))
(defparameter mccso (make-operation 'monolithic-compile-concatenated-source-op))
(defparameter mlccso (make-operation 'monolithic-load-compiled-concatenated-source-op))
(defparameter sys (find-system :test-concatenate-source))
(assert (operation-monolithic-p mcso))
16 17 18
(assert-pathnames-equal
 (input-files mcso sys)
 (loop :for n :in '(3 1 2) :collect (test-source (format nil "file~D.lisp" n))))
19 20 21 22 23
(with-expected-failure (#+xcl "xcl has buggy translate-pathname")
  (assert-pathname-equal
   (output-file mcso sys)
   (apply-output-translations
    (resolve-output "asdf/test/test-concatenate-source--all-systems.lisp"))))
24
(assert-pathnames-equal
25 26
 (output-files mcso sys)
 (input-files mccso sys))
27
;; on ECL, we get un-equal pathnames.
28 29 30
(assert-pathname-equal
 (first (output-files mccso sys))
 (test-fasl "test-concatenate-source--all-systems.lisp"))
31
(assert-pathnames-equal
32 33 34 35
 (output-files mccso sys)
 (input-files mlccso sys))
(operate 'monolithic-load-compiled-concatenated-source-op sys)
(assert (symbol-value (find-symbol* :*file3* :test-package)))