test-builtin-source-file-type.script 1.89 KB
Newer Older
1 2 3 4
;;; -*- Lisp -*-
(load "script-support.lisp")
(load-asdf)

5 6
;;(trace source-file-type)

7
(with-test ()
8
 (format t "~D~%" (asdf:asdf-version))
9

10
 (def-test-system test-builtin-source-file-type-1
11 12 13 14
   :default-component-class cl-source-file.cl
   :serial t
   :components ((:cl-source-file "file1") ; for the package
                (:file "test-tmp")))
15
 (load-system 'test-builtin-source-file-type-1 :verbose t)
16
 (assert (symbol-value (read-from-string "test-package::*test-tmp-cl*")))
17 18 19 20
 (assert-equal
  (mapcar #'pathname-type
          (mapcar #'asdf:component-pathname (asdf:module-components (asdf:find-system :test-source-file-type-1))))
  '("lisp" "cl"))
21
 (delete-package :test-package)
22

23 24
 (def-test-system
     test-builtin-source-file-type-2
25 26 27 28
   :default-component-class cl-source-file.cl
   :serial t
   :components ((:file "file1" :type "lisp") ; for package
                (:file "test-tmp")))
29
 (asdf:load-system 'test-builtin-source-file-type-2 :verbose t)
30
 (assert (symbol-value (read-from-string "test-package::*test-tmp-cl*")))
31

32
 (def-test-system test-builtin-source-file-type-3
33 34 35 36
   :default-component-class cl-source-file.lsp
   :serial t
   :components ((:cl-source-file "file1") ; for the package
                (:file "test-tmp")))
37 38
 (asdf:load-system 'test-builtin-source-file-type-3 :verbose t)
 (assert (symbol-value (read-from-string "test-package::*test-tmp-cl*")))
39 40 41 42
 (assert-equal
  (mapcar #'pathname-type
          (mapcar #'asdf:component-pathname (asdf:module-components (asdf:find-system :test-source-file-type-1))))
  '("lisp" "cl"))
43
 (delete-package :test-package)
44

45
 (def-test-system test-builtin-source-file-type-4
46 47 48 49
   :default-component-class cl-source-file.lsp
   :serial t
   :components ((:file "file1" :type "lisp") ; for package
                (:file "test-tmp")))
50
 (asdf:load-system 'test-builtin-source-file-type-4 :verbose t)
51
 (assert (symbol-value (read-from-string "test-package::*test-tmp-cl*"))))