X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fpathnames.impure.lisp;h=c7ee31b23a02b8c86bb10c2642b7e27f15a16955;hb=ba38798a5ca26b90647a1993f348806cb32f2d1b;hp=6682f8c52cce2de2ae55b470a98f8e25a1e0a9c4;hpb=aa2dc9529460ea0d9c99998dc87283fc1a43e808;p=sbcl.git diff --git a/tests/pathnames.impure.lisp b/tests/pathnames.impure.lisp index 6682f8c..c7ee31b 100644 --- a/tests/pathnames.impure.lisp +++ b/tests/pathnames.impure.lisp @@ -79,7 +79,6 @@ ;;; FIXME: currently SBCL throws NAMESTRING-PARSE-ERROR: should this be ;;; a TYPE-ERROR? -;; error: directory-component not valid (assert (not (ignore-errors (make-pathname :host "FOO" :directory "!bla" :name "bar")))) @@ -112,9 +111,9 @@ ;;; turning one logical pathname into another: (setf (logical-pathname-translations "foo") - '(("tohome;*.*.*" "home:*.*.*"))) -(assert (equal (namestring (translate-logical-pathname "foo:tohome;x.y")) - "home:x.y")) + '(("todemo;*.*.*" "demo0:*.*.*"))) +(assert (equal (namestring (translate-logical-pathname "foo:todemo;x.y")) + (namestring (translate-logical-pathname "demo0:x.y")))) ;;; ANSI, in its wisdom, specifies that it's an error (specifically a ;;; TYPE-ERROR) to query the system about the translations of a string @@ -123,6 +122,9 @@ (let ((cond (grab-condition (logical-pathname-translations "unregistered-host")))) (assert (typep cond 'type-error))) +(assert (not (string-equal (host-namestring (parse-namestring "OTHER-HOST:ILLEGAL/LPN")) "OTHER-HOST"))) +(assert (string-equal (pathname-name (parse-namestring "OTHER-HOST:ILLEGAL/LPN")) "LPN")) + ;;; FIXME: A comment on this section up to sbcl-0.6.11.30 or so said ;;; examples from CLHS: Section 19.4, LOGICAL-PATHNAME-TRANSLATIONS ;;; (sometimes converted to the Un*x way of things) @@ -158,7 +160,7 @@ (assert (equal (namestring (translate-logical-pathname "test0:foo;bar;baz;mum.quux.3")) "/library/foo/foo/bar/baz/mum.quux")) - + ;;;; MERGE-PATHNAME tests ;;;; ;;;; There are some things we don't bother testing, just because they're @@ -173,7 +175,7 @@ ;;;; other implementations, they depend quite heavily on the rules for ;;;; namestring parsing, which are implementation-specific. So, success ;;;; or failure in these tests doesn't tell you anything about -;;;; ansi-compliance unless your PARSE-NAMESTRING works like ours. +;;;; ANSI-compliance unless your PARSE-NAMESTRING works like ours. (setf (logical-pathname-translations "scratch") '(("**;*.*.*" "/usr/local/doc/**/*"))) @@ -214,7 +216,7 @@ ;; === logical pathnames === ;; recognizes a logical pathname namestring when ;; default-pathname is a logical pathname - ;; FIXME: 0.6.12.20 fails this one. + ;; FIXME: 0.6.12.23 fails this one. #+nil (#P"scratch:foo;name1" #p"name1" #p"scratch:foo;") ;; or when the namestring begins with the name of a defined ;; logical host followed by a colon [I assume that refers to pathname @@ -244,7 +246,7 @@ (#p"SCRATCH:ABSOLUTE;PATH;NAME.TYPE" #p"scratch:absolute;path;name" #p"/dir/default-name.type") - ;; TODO: test version handling in LPNs + ;; FIXME: test version handling in LPNs ) do (assert (string= (namestring (apply #'merge-pathnames params)) (namestring expected-result))))