Skip to content
test-logical-pathname.script 1.8 KiB
Newer Older
;;; -*- Lisp -*-
(load "script-support.lisp")
(load-asdf)

(setf (logical-pathname-translations "ASDF")
      #+(or allegro clisp)
      `(("**;*.*.*" ,(asdf::wilden *asdf-directory*)))
      #-(or allegro clisp)
      `(("**;*.asd.*" ,(make-pathname :type "asd" :defaults (asdf::wilden *asdf-directory*)))
        ("**;*.lisp.*" ,(make-pathname :type "lisp" :defaults (asdf::wilden *asdf-directory*)))
        ("**;*.*.*" ,(resolve-location
                      `(,*asdf-directory* "build/fasls" :implementation "logical-host-asdf")

(quit-on-error
 (format t "~S~%" (translate-logical-pathname "ASDF:test;test-force.asd"))
 (format t "~S~%" (truename "ASDF:test;test-force.asd"))

 (progn
   (format t "Test logical pathnames in central registry~%")
   (setf *central-registry* '(#p"ASDF:test;"))
   (initialize-source-registry '(:source-registry :ignore-inherited-configuration))
   (load-system :test-logical-pathname :force t))
 (progn
   (format t "Test logical pathnames in source-registry, non-recursive~%")
   (clear-system :test-logical-pathname)
   (setf *central-registry* '())
   (initialize-source-registry
    '(:source-registry (:directory #p"ASDF:test;") :ignore-inherited-configuration))
   (load-system :test-logical-pathname :force t :verbose t))
 (progn
   (format t "Test logical pathnames in source-registry, recursive~%")
   (clear-system :test-logical-pathname)
   (setf *central-registry* '())
   (initialize-source-registry
    ;; Bug: Allegro Express 8.2 incorrectly reads #p"ASDF:" as relative.
    '(:source-registry (:tree #-allegro #p"ASDF:" #+allegro #.(asdf::pathname-root #p"ASDF:"))
      :ignore-inherited-configuration))
   (load-system :test-logical-pathname :force t))