Newer
Older
(load "script-support.lisp")
(asdf:load-system 'test-module-pathnames)
Francois-Rene Rideau
committed
(flet ((pathname-foo (x)
(list (or (asdf::normalize-pathname-directory-component (pathname-directory x)) '(:relative))
(pathname-name x) (pathname-type x))))
(let* ((static (find-component "test-module-pathnames" '("sources/level1" "level2/static.file")))
(test-tmp (find-component "test-module-pathnames" '("sources/level1" "test-tmp.cl"))))
(assert-equal (pathname-foo (asdf:component-relative-pathname test-tmp))
'((:relative) "test-tmp" "cl"))
(assert-equal (pathname-foo (asdf:component-relative-pathname static))
'((:relative "level2") "static" "file"))))
(assert (find-package :test-package)
() "package test-package not found")
(assert (find-symbol (symbol-name '*file-tmp*) :test-package)
() "symbol `*file-tmp*` not found")
(assert (symbol-value (find-symbol (symbol-name '*file-tmp*) :test-package))
() "symbol `*file-tmp*` has wrong value")
Francois-Rene Rideau
committed
(assert (probe-file
(asdf::apply-output-translations
(asdf::merge-pathnames*
(asdf::make-pathname*
:name "file1"
:type (asdf::fasl-type)
:directory '(:relative "sources" "level1"))
*test-directory*)))
() "compiled file not found")
Francois-Rene Rideau
committed
(assert (find-symbol (symbol-name '*file-tmp2*) :test-package)
() "symbol `*file-tmp2*` not found")
(assert (symbol-value (find-symbol (symbol-name '*file-tmp2*) :test-package))
Francois-Rene Rideau
committed
() "symbol `*file-tmp2*` has wrong value")
Francois-Rene Rideau
committed
(assert (probe-file
(asdf::apply-output-translations
(asdf::merge-pathnames*
(asdf::make-pathname*
:name "file2"
:type (asdf::fasl-type)
:directory '(:relative "sources" "level1" "level2")))))
nil "compiled file not found"))