Changeset 12140 in project for release/4/uri-generic/trunk/tests


Ignore:
Timestamp:
10/12/08 22:55:29 (12 years ago)
Author:
sjamaan
Message:

Merge changes from uri-generic for chicken 3

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

Legend:

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

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

    r11826 r12140  
    136136                  )))
    137137            extra-cases))
     138
     139(define encode/decode-cases
     140  '(("foo?bar" "foo%3fbar")
     141    ("foo&bar" "foo%26bar")
     142    ("foo%20bar" "foo%2520bar")))
     143
     144(test-group "uri-encode-string test"
     145  (for-each (lambda (p)
     146              (let ((expected (second p))
     147                    (encoded (uri-encode-string (first p))))
     148                  (test (sprintf "~S -> ~S" (first p) expected) expected encoded)))
     149            encode/decode-cases))
     150
     151(test-group "uri-decode-string test"
     152  (for-each (lambda (p)
     153              (let ((expected (first p))
     154                    (decoded (uri-decode-string (second p))))
     155                  (test (sprintf "~S -> ~S" (second p) expected) expected decoded)))
     156            encode/decode-cases))
Note: See TracChangeset for help on using the changeset viewer.