test-logical-pathname.script 1.75 KB
Newer Older
1
2
3
4
5
;;; -*- Lisp -*-
(load "script-support.lisp")
(load-asdf)

(setf (logical-pathname-translations "ASDF")
6
7
8
9
10
      #+(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*)))
11
        ("**;*.*.*" ,(resolve-location
12
13
                      `(,*asdf-directory* "tmp/fasls" :implementation "logical-host-asdf")
                      :wilden t))))
14
15
16
17
18

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

19
20
21
22
23
 (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-force :force t))
24

25
26
27
28
29
30
31
 (progn
   (format t "Test logical pathnames in source-registry, non-recursive~%")
   (clear-system :test-force)
   (setf *central-registry* '())
   (initialize-source-registry
    '(:source-registry (:directory #p"ASDF:test;") :ignore-inherited-configuration))
   (load-system :test-force :force t))
32

33
34
35
36
37
38
39
40
41
42
 #-allegro ;; Allegro 8.2 seems to have trouble with logical-pathnames. disable for now.
 (progn
   (format t "Test logical pathnames in source-registry, recursive~%")
   (clear-system :test-force)
   (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-force :force t))
43
44

 (format t "Done~%"))