;;; Loading "/home/pjb/src/lisp/check-pathnames/check-pathnames.lisp"
check-pathnames of ECL (10.7.1)

================================================================================

Test and probe conforming logical pathnames, and their translation to
unix physical pathnames.

We want to check the good working of logical pathnames, and the
translation of logical pathnames to physical pathnames, in a
semi-standard way on unix systems.

Namely, given the logical host and its translations:

  (setf (logical-pathname-translations "LOGICAL") nil)
  (setf (logical-pathname-translations "LOGICAL")
        '((#P"LOGICAL:**;*.*" #P"/tmp/**/*.*")
          (#P"LOGICAL:**;*"   #P"/tmp/**/*")))

#P"LOGICAL:DIR;SUBDIR;NAME.TYPE.NEWEST"
must be the same as (make-pathname :host "LOGICAL"
                                   :directory '(:absolute "DIR" "SUBDIR")
                                   :name "NAME" :type "TYPE" :version :newest
                                   :case :common)
and must translate to: #P"/tmp/dir/subdir/name.type" on unix.



Merging physical pathnames specified with :case :common is also tested:

  (merge-pathnames (make-pathname :directory '(:relative "DIR" "SUBDIR")
                                  :name "NAME" :type "TYPE" :version :newest
                                  :case :common :default #1=#P"/tmp/")
                    #1# nil)

must give #P"/tmp/dir/subdir/name.type" on unix.

================================================================================



With ECL (10.7.1) on Linux, the customary case for the file system of the host
NIL of the pathname "/tmp/name.type" seems to be lower case.


*FEATURES* = (:LINUX :FORMATTER :LONG-LONG :UINT64-T :UINT32-T :UINT16-T
              :RELATIVE-PACKAGE-NAMES :LONG-FLOAT :UNICODE :CLOS-STREAMS
              :CMU-FORMAT :UNIX :ECL-PDE :DLOPEN :CLOS :BOEHM-GC :ANSI-CL
              :COMMON-LISP :IEEE-FLOATING-POINT :PREFIXED-API :FFI :X86_64
              :COMMON :ECL)





================================================================================
(MAKE-PATHNAME :HOST
               "LOGICAL"
               :DEVICE
               :UNSPECIFIC
               :DIRECTORY
               (:ABSOLUTE "DIR" "SUBDIR")
               :NAME
               "NAME"
               :TYPE
               "TYPE"
               :VERSION
               :NEWEST
               :CASE
               :COMMON)


LOGICAL-PATHNAME #P"LOGICAL:DIR;SUBDIR;NAME.TYPE.NEWEST"
--------------------  :case :local (default)
Host      : "LOGICAL"
Device    : :UNSPECIFIC
Directory : (:ABSOLUTE "DIR" "SUBDIR")
Name      : "NAME"
Type      : "TYPE"
Version   : :NEWEST
--------------------  :case :common
Host      : "logical"
Device    : :UNSPECIFIC
Directory : (:ABSOLUTE "dir" "subdir")
Name      : "name"
Type      : "type"
Version   : :NEWEST
--------------------
--------------------------------------------------------------------------------
Failed assertion: (STRING= (PATHNAME-HOST PATH :CASE :COMMON)
                           (POP EXPECTED-VALUES))
   with: (PATHNAME-HOST PATH :CASE :COMMON) = "logical"
    and: (POP EXPECTED-VALUES) = "LOGICAL"
19.2.2.1.2  makes no exception for pathname-host of logical pathnames.
--------------------------------------------------------------------------------
Failed assertion: (DIRLIST= (PATHNAME-DIRECTORY PATH :CASE :COMMON)
                            (POP EXPECTED-VALUES))
   with: (PATHNAME-DIRECTORY PATH :CASE :COMMON) = (:ABSOLUTE "dir" "subdir")
    and: (POP EXPECTED-VALUES) = (:ABSOLUTE "DIR" "SUBDIR")
--------------------------------------------------------------------------------
Failed assertion: (STRING= (PATHNAME-NAME PATH :CASE :COMMON)
                           (POP EXPECTED-VALUES))
   with: (PATHNAME-NAME PATH :CASE :COMMON) = "name"
    and: (POP EXPECTED-VALUES) = "NAME"
--------------------------------------------------------------------------------
Failed assertion: (STRING= (PATHNAME-TYPE PATH :CASE :COMMON)
                           (POP EXPECTED-VALUES))
   with: (PATHNAME-TYPE PATH :CASE :COMMON) = "type"
    and: (POP EXPECTED-VALUES) = "TYPE"



================================================================================
(MAKE-PATHNAME :HOST
               "logical"
               :DEVICE
               :UNSPECIFIC
               :DIRECTORY
               (:ABSOLUTE "dir" "subdir")
               :NAME
               "name"
               :TYPE
               "type"
               :VERSION
               :NEWEST
               :CASE
               :LOCAL)


LOGICAL-PATHNAME #P"LOGICAL:DIR;SUBDIR;NAME.TYPE.NEWEST"
--------------------  :case :local (default)
Host      : "LOGICAL"
Device    : :UNSPECIFIC
Directory : (:ABSOLUTE "DIR" "SUBDIR")
Name      : "NAME"
Type      : "TYPE"
Version   : :NEWEST
--------------------  :case :common
Host      : "logical"
Device    : :UNSPECIFIC
Directory : (:ABSOLUTE "dir" "subdir")
Name      : "name"
Type      : "type"
Version   : :NEWEST
--------------------
--------------------------------------------------------------------------------
Failed assertion: (STRING= (PATHNAME-HOST PATH :CASE :COMMON)
                           (POP EXPECTED-VALUES))
   with: (PATHNAME-HOST PATH :CASE :COMMON) = "logical"
    and: (POP EXPECTED-VALUES) = "LOGICAL"
19.2.2.1.2  makes no exception for pathname-host of logical pathnames.
--------------------------------------------------------------------------------
Failed assertion: (DIRLIST= (PATHNAME-DIRECTORY PATH :CASE :COMMON)
                            (POP EXPECTED-VALUES))
   with: (PATHNAME-DIRECTORY PATH :CASE :COMMON) = (:ABSOLUTE "dir" "subdir")
    and: (POP EXPECTED-VALUES) = (:ABSOLUTE "DIR" "SUBDIR")
--------------------------------------------------------------------------------
Failed assertion: (STRING= (PATHNAME-NAME PATH :CASE :COMMON)
                           (POP EXPECTED-VALUES))
   with: (PATHNAME-NAME PATH :CASE :COMMON) = "name"
    and: (POP EXPECTED-VALUES) = "NAME"
--------------------------------------------------------------------------------
Failed assertion: (STRING= (PATHNAME-TYPE PATH :CASE :COMMON)
                           (POP EXPECTED-VALUES))
   with: (PATHNAME-TYPE PATH :CASE :COMMON) = "type"
    and: (POP EXPECTED-VALUES) = "TYPE"
ViewGit