Changeset 13230 in project for release/3/uri-generic/trunk/tests


Ignore:
Timestamp:
02/09/09 23:05:20 (12 years ago)
Author:
sjamaan
Message:

Merge latest changes from release 4

Location:
release/3/uri-generic/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/3/uri-generic/trunk

  • release/3/uri-generic/trunk/tests/run.scm

    r13212 r13230  
    127127              (let ((ubase (uri-reference (first p)))
    128128                    (urabs  (uri-reference (second p)))
    129                     (uabs  (absolute-uri (second p)))
    130129                    (uex   (uri-reference (third p))))
    131130                (let* ((from (uri-relative-from urabs ubase))
     
    133132                  (test (apply sprintf "~S * ~S -> ~S" p) uex from)
    134133                  (test (apply sprintf "~S * ~S -> ~S" p) urabs to)
    135                   (if (not (uri-fragment urabs))
    136                       (test (sprintf "~S = ~S" uabs urabs) urabs uabs))
     134                  (unless (uri-fragment urabs)
     135                    (let ((uabs  (absolute-uri (second p))))
     136                      (test (sprintf "~S = ~S" uabs urabs) urabs uabs)))
    137137                  ))
    138138              (for-each
     
    322322(test-group "absolute/relative distinction"
    323323  (for-each (lambda (s)
    324               (test-assert (sprintf "~S is relative" s)
     324              (test-assert (sprintf "~S is a relative ref" s)
    325325                           (relative-ref? (uri-reference s)))
    326               (test-assert (sprintf "~S is not absolute" s)
     326              (test-assert (sprintf "~S is not an URI" s)
     327                           (not (uri? (uri-reference s))))
     328              (test-assert (sprintf "~S is not an absolute URI" s)
    327329                           (not (absolute-uri? (uri-reference s))))
    328330              (test-error (absolute-uri s)))
    329331            relative-refs)
    330332  (for-each (lambda (s)
    331               (test-assert (sprintf "~S is not relative" s)
     333              (test-assert (sprintf "~S is not a relative ref" s)
    332334                           (not (relative-ref? (uri-reference s))))
    333               (test-assert (sprintf "~S is absolute" s)
     335              (test-assert (sprintf "~S is an URI" s)
     336                           (uri? (uri-reference s)))
     337              (test-assert (sprintf "~S is an absolute URI" s)
    334338                           (absolute-uri? (uri-reference s)))
    335339              (test (uri-reference s) (absolute-uri s)))
    336340            absolute-uris)
    337341  (for-each (lambda (s)
    338               (test-assert (sprintf "~S is not relative" s)
     342              (test-assert (sprintf "~S is not a relative ref" s)
    339343                           (not (relative-ref? (uri-reference s))))
    340               (test-assert (sprintf "~S is not absolute" s)
     344              (test-assert (sprintf "~S is an URI" s)
     345                           (uri? (uri-reference s)))
     346              (test-assert (sprintf "~S is not an absolute URI" s)
    341347                           (not (absolute-uri? (uri-reference s))))
    342348              ;; Should this give an error in the fragment case?
Note: See TracChangeset for help on using the changeset viewer.