Ignore:
Timestamp:
04/15/10 14:27:09 (12 years ago)
Author:
Mark Evenson
Message:

URL pathnames working for OPEN for built-in schemas.

Still need to decide with URI escaping issues, as we currently rely on
the URL Stream handlers to do the right thing. And we still need to
retrofit jar pathname's use of a string to represent a URL.

Updates for URL and jar pathname design documents.

Implemented URL-PATHNAME and JAR-PATHNAME as subtypes of PATHNAME.

Adjusted ABCL-TEST-LISP to use functions provided in
"pathname-test.lisp" in "jar-file.lisp". Added one test for url
pathnames.

Constructor in Java added for a Cons by copying references from the
orignal Cons.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/test/lisp/abcl/jar-file.lisp

    r12531 r12607  
    321321  (:absolute "c" "d") "foo" "lisp")
    322322
     323(deftest jar-file.pathname-match-p.1
     324    (pathname-match-p "jar:file:/a/b/some.jar!/a/system/def.asd"
     325                      "jar:file:/**/*.jar!/**/*.asd")
     326  t)
     327
     328(deftest jar-file.pathname-match-p.2
     329    (pathname-match-p "/a/system/def.asd"
     330                      "jar:file:/**/*.jar!/**/*.asd")
     331  nil)
     332
     333(deftest jar-file.pathname-match-p.3
     334    (pathname-match-p "jar:file:/a/b/some.jar!/a/system/def.asd"
     335                      "/**/*.asd")
     336  nil)
     337
     338(deftest jar-file.translate-pathname.1
     339    (namestring
     340     (translate-pathname "jar:file:/a/b/c.jar!/d/e/f.lisp"
     341                         "jar:file:/**/*.jar!/**/*.*"
     342                         "/foo/**/*.*"))
     343  "/foo/d/e/f.lisp")
     344
     345;; URL Pathname tests
     346(deftest pathname-url.1
     347    (let* ((p #p"http://example.org/a/b/foo.lisp")
     348           (host (pathname-host p)))
     349      (values
     350       (check-physical-pathname p '(:absolute "a" "b") "foo" "lisp")
     351       (and (consp host)
     352            (equal (getf host :scheme)
     353                   "http")
     354            (equal (getf host :authority)
     355                   "example.org"))))
     356  (t t))
     357
    323358     
    324      
    325              
    326 
    327        
     359
    328360       
    329361
Note: See TracChangeset for help on using the changeset viewer.