source: trunk/abcl/test/lisp/abcl/url-pathname.lisp @ 12616

Last change on this file since 12616 was 12616, checked in by Mark Evenson, 14 years ago

All URL/JAR tests now passing.

File size: 862 bytes
Line 
1(in-package #:abcl.test.lisp)
2
3;; URL Pathname tests
4(deftest url-pathname.1
5    (let* ((p #p"http://example.org/a/b/foo.lisp")
6           (host (pathname-host p)))
7      (values 
8       (check-physical-pathname p '(:absolute "a" "b") "foo" "lisp")
9       (and (consp host)
10            (equal (getf host :scheme) 
11                   "http")
12            (equal (getf host :authority)
13                   "example.org"))))
14  t t)
15
16(deftest url-pathname.2
17    (let* ((p (pathname "http://example.org/a/b/foo.lisp?query=this#that-fragment"))
18           (host (pathname-host p)))
19      (values 
20       (check-physical-pathname p '(:absolute "a" "b") "foo" "lisp")
21       (consp host)
22       (getf host :scheme) 
23       (getf host :authority)
24       (getf host :query)
25       (getf host :fragment)))
26  t 
27  t
28  "http"
29  "example.org"
30  "query=this" 
31  "that-fragment")
Note: See TracBrowser for help on using the repository browser.