summaryrefslogtreecommitdiff
path: root/test-suite/tests
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-12-31 12:44:11 -0500
committerAndy Wingo <wingo@pobox.com>2011-01-07 09:18:36 -0800
commit8745c33afbb7b103e9aa27adbd55884e6bbd4b51 (patch)
treea2d242f3bcb905dd28a06dab59417e420cae65fd /test-suite/tests
parentb3f9444892224e1ee35645681cb20fe8e8ec2ff8 (diff)
downloadguile-8745c33afbb7b103e9aa27adbd55884e6bbd4b51.tar.gz
rename string->uri and uri->string.
* module/web/uri.scm (string->uri, uri->string): Rename from parse-uri and unparse-uri. * test-suite/tests/web-uri.test: * module/web/http.scm: All callers changed.
Diffstat (limited to 'test-suite/tests')
-rw-r--r--test-suite/tests/web-uri.test36
1 files changed, 18 insertions, 18 deletions
diff --git a/test-suite/tests/web-uri.test b/test-suite/tests/web-uri.test
index 832bccffc..534380af7 100644
--- a/test-suite/tests/web-uri.test
+++ b/test-suite/tests/web-uri.test
@@ -107,25 +107,25 @@
(build-uri 'http #:userinfo "foo")))
-(with-test-prefix "parse-uri"
+(with-test-prefix "string->uri"
(pass-if "ftp:"
- (uri=? (parse-uri "ftp:")
+ (uri=? (string->uri "ftp:")
#:scheme 'ftp
#:path ""))
(pass-if "ftp:foo"
- (uri=? (parse-uri "ftp:foo")
+ (uri=? (string->uri "ftp:foo")
#:scheme 'ftp
#:path "foo"))
(pass-if "ftp://foo/bar"
- (uri=? (parse-uri "ftp://foo/bar")
+ (uri=? (string->uri "ftp://foo/bar")
#:scheme 'ftp
#:host "foo"
#:path "/bar"))
(pass-if "ftp://foo@bar:22/baz"
- (uri=? (parse-uri "ftp://foo@bar:22/baz")
+ (uri=? (string->uri "ftp://foo@bar:22/baz")
#:scheme 'ftp
#:userinfo "foo"
#:host "bar"
@@ -133,49 +133,49 @@
#:path "/baz"))
(pass-if "http://bad.host.1"
- (not (parse-uri "http://bad.host.1")))
+ (not (string->uri "http://bad.host.1")))
(pass-if "http://foo:"
- (uri=? (parse-uri "http://foo:")
+ (uri=? (string->uri "http://foo:")
#:scheme 'http #:host "foo" #:path ""))
(pass-if "http://foo:/"
- (uri=? (parse-uri "http://foo:/")
+ (uri=? (string->uri "http://foo:/")
#:scheme 'http #:host "foo" #:path "/"))
(pass-if "http://foo:not-a-port"
- (not (parse-uri "http://foo:not-a-port")))
+ (not (string->uri "http://foo:not-a-port")))
(pass-if "http://:10"
- (not (parse-uri "http://:10")))
+ (not (string->uri "http://:10")))
(pass-if "http://foo@"
- (not (parse-uri "http://foo@"))))
+ (not (string->uri "http://foo@"))))
-(with-test-prefix "unparse-uri"
+(with-test-prefix "uri->string"
(pass-if "ftp:"
(equal? "ftp:"
- (unparse-uri (parse-uri "ftp:"))))
+ (uri->string (string->uri "ftp:"))))
(pass-if "ftp:foo"
(equal? "ftp:foo"
- (unparse-uri (parse-uri "ftp:foo"))))
+ (uri->string (string->uri "ftp:foo"))))
(pass-if "ftp://foo/bar"
(equal? "ftp://foo/bar"
- (unparse-uri (parse-uri "ftp://foo/bar"))))
+ (uri->string (string->uri "ftp://foo/bar"))))
(pass-if "ftp://foo@bar:22/baz"
(equal? "ftp://foo@bar:22/baz"
- (unparse-uri (parse-uri "ftp://foo@bar:22/baz"))))
+ (uri->string (string->uri "ftp://foo@bar:22/baz"))))
(pass-if "http://foo:"
(equal? "http://foo"
- (unparse-uri (parse-uri "http://foo:"))))
+ (uri->string (string->uri "http://foo:"))))
(pass-if "http://foo:/"
(equal? "http://foo/"
- (unparse-uri (parse-uri "http://foo:/")))))
+ (uri->string (string->uri "http://foo:/")))))
(with-test-prefix "decode"
(pass-if (equal? "foo bar" (uri-decode "foo%20bar"))))