Changeset 4085 in project


Ignore:
Timestamp:
05/08/07 08:04:15 (14 years ago)
Author:
Kon Lovett
Message:

Fixes for split up uri/url egg. Rmvd older ver copies.

Location:
uri
Files:
1 added
5 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • uri/uri-test.scm

    r4084 r4085  
    66#| TestBase
    77  (test
    8     (purpose "Checkout url build.")
    9     (feature url uri)
    10     (reader-extension url))
     8    (purpose "Checkout uri build.")
     9    (feature uri)
     10    (reader-extension uri))
    1111
    1212  (compile
    13     (extend (use url)))
     13    (extend (use uri)))
    1414|#
    1515
     
    1818(define-test uri-test "URI"
    1919  (initial
    20     (define turl #f)
    2120    (define turi #f)
    2221  )
    23 
    24   (expect-set! turl (url "http://www.ics.uci.edu:80"))
    25   (expect-false "Null path" (url-path turl))
    2622
    2723  (expect-set! turi
     
    3026  (expect-equal "http://www.ics.uci.edu:80/pub/ietf/uri/#Related" (uri->string turi))
    3127
    32   (expect-set! turl
    33     (make-url #:scheme "http" #:host "www.ics.uci.edu" #:port 80 #:path "pub/ietf/uri"))
    34   (expect-true (url? turl))
    35   (expect-equal "http://www.ics.uci.edu:80/pub/ietf/uri" (url->string turl))
    36 
    3728  (expect-equal
    3829    '(http (#f "www.ics.uci.edu" 80) ("" "pub" "ietf" "uri" "") #f "Related")
    3930    (uri->tree "http://www.ics.uci.edu:80/pub/ietf/uri/#Related"))
    40 
    41   (expect-set! turl (url "http://www.ics.uci.edu:80/pub/ietf/uri;type=i"))
    42   (expect-true (url? turl))
    43 
    44   (expect-equal (warn "Suffix '/' in output was not part of the input!")
    45     "http://www.ics.uci.edu:80/pub/ietf/uri/;type=i"
    46     (url->string (url "http://www.ics.uci.edu:80/pub/ietf/uri;type=i")))
    47   (expect-eq #\i (url-typecode turl))
    4831
    4932  (expect-failure "Invalid query component"
     
    8972  (expect-set! turi
    9073    (uri "http://www.ics.uci.edu:80/pub/ietf/uri?foo=23+45&bar=abcedf&bax=x%0Ay"))
    91   (expect-equal (warn "Note reversal of query items turl!")
     74  (expect-equal (warn "Note reversal of query items turi!")
    9275    '(("bax" . "x\ny") ("bar" . "abcedf") ("foo" . "23 45"))
    9376    (uri-query turi))
    94   (expect-equal (warn "Note reversal of query items from turl!")
     77  (expect-equal (warn "Note reversal of query items from turi!")
    9578    "http://www.ics.uci.edu:80/pub/ietf/uri?bax=x%0Ay&bar=abcedf&foo=23+45"
    9679    (uri->string turi))
  • uri/uri.meta

    r4084 r4085  
    55 (license "BSD")
    66 (needs coerce)
    7  (author "felix winkelmann and Kon Lovett, with code taken from Aubrey Jaffers' SLIB")
    8  (files "uri.scm" "ftp-parse.scm" "uri-test.scm"
    9         "uri.setup" "setup-header.scm") )
     7 (author "Felix Winkelmann and Kon Lovett, with code taken from Aubrey Jaffers' SLIB")
     8 (files
     9   "ftp-parse.scm"
     10   "uri.scm" "uri.setup" "uri.html" "uri-test.scm"
     11         "setup-header.scm") )
  • uri/uri.scm

    r4084 r4085  
    3737      uri
    3838      make-uri
     39      *make-uri
    3940      uri?
    4041      uri-scheme
     
    5758      uri-decode-query
    5859      uri-encode-query
     60      uri-decode-query-item
     61      uri-encode-query-item
    5962      pathname->uri
    6063      absolute-uri?
     64      uri-split-path
    6165      uri-split-path-null?
    6266      uri-path-null?
    63       ;; uri compatibility (deprecated)
    64       uri-split-fields uri-make-path path->uri uri-path->keys absolute-path?
    65       null-directory? glob-pattern?)))
     67      ;; deprecated
     68      uri-make-path
     69      path->uri
     70      uri-split-fields
     71      uri-path->keys
     72      absolute-path?
     73      null-directory?
     74      glob-pattern?) ) )
    6675
    6776;;; Constants
     
    274283;; Only for use when parsing an unencoded string path!
    275284
    276 (define (split-path path)
     285(define (uri-split-path path)
    277286  (let ([path-list (string-split path "/" #t)])
    278287    (if (rooted-split-path? path-list)
     
    433442        ""]
    434443      [(list? path)
    435         (uri-make-path path)]
     444        (uri-encode-split-path path)]
    436445      [else
    437446        (or path "")])
     
    652661  ; Path
    653662  (when (string? path)
    654     (set! path (split-path path)))
     663    (set! path (uri-split-path path)))
    655664  (when (null? path)
    656665    (set! path #f))
  • uri/uri.setup

    r4084 r4085  
    33(required-chicken-version 2.6)
    44
    5 (install-dynld uri "3.1")
    6 (install-dynld ftp-parse "1.0")
     5(install-dynld+docu uri "3.1")
     6(install-dynld ftp-parse "1.0" (documentation "uri.html"))
    77
    88(install-test "uri-test.scm")
Note: See TracChangeset for help on using the changeset viewer.