Modest/test/myurl/data/relative.test

209 lines
3.6 KiB
Plaintext

type 3
%URL:/path
%BASE:http://example.com/
%EXPECT:http://example.com/path
%URL:/path/
%BASE:http://example.com/
%EXPECT:http://example.com/path/
%URL:../path/
%BASE:http://example.com/
%EXPECT:http://example.com/path/
%URL:/../path/
%BASE:http://example.com/
%EXPECT:http://example.com/path/
%URL:../../path/
%BASE:http://example.com/
%EXPECT:http://example.com/path/
%URL:/../../path/
%BASE:http://example.com/
%EXPECT:http://example.com/path/
%URL:/../../../../../../../../../../../../path/
%BASE:http://example.com/
%EXPECT:http://example.com/path/
%URL:a/b/c/../../path/
%BASE:http://example.com/
%EXPECT:http://example.com/a/path/
%URL:a/b/c/../../path/
%BASE:http://example.com/
%EXPECT:http://example.com/a/path/
%URL:a/b/c/./../path/
%BASE:http://example.com/
%EXPECT:http://example.com/a/b/path/
%URL:a/b/c/././path/
%BASE:http://example.com/
%EXPECT:http://example.com/a/b/c/path/
%URL:a/b/../c/././././././././path/
%BASE:http://example.com/
%EXPECT:http://example.com/a/c/path/
%URL:a/b/../c/././././././././
%BASE:http://example.com/
%EXPECT:http://example.com/a/c/
%URL:a/b/../c/./././././././.
%BASE:http://example.com/
%EXPECT:http://example.com/a/c/
%URL:a/b/../c/./././././././.
%BASE:http://example.com/
%EXPECT:http://example.com/a/c/
%URL:a/b/../c
%BASE:http://example.com/../../
%EXPECT:http://example.com/a/c
%URL:/path/
%BASE:http://example.com/?key=value&a=1
%EXPECT:http://example.com/path/
%URL:/path/
%BASE:http://example.com/?key=value&a=1
%EXPECT:http://example.com/path/
%URL:/path/?b=2
%BASE:http://example.com/?key=value&a=1
%EXPECT:http://example.com/path/?b=2
%URL:/path/
%BASE:http://example.com/#hash
%EXPECT:http://example.com/path/
%URL:/path/#myhash
%BASE:http://example.com/#hash
%EXPECT:http://example.com/path/#myhash
%URL: /path/
%BASE:http://example.com
%EXPECT:http://example.com/path/
%URL: .
%BASE:http://example.com/path
%EXPECT:http://example.com/
%URL:
%BASE:http://example.com/
%EXPECT:http://example.com/
%URL:http:/path
%BASE:http://host/a
%EXPECT:http://host/path
%URL:HTTP:/path
%BASE:http://host/a
%EXPECT:http://host/path
%URL:HTTP:path
%BASE:http://host/a
%EXPECT:http://host/path
%URL:HTTP:path
%BASE:http://host/a/
%EXPECT:http://host/a/path
%URL:HTTP:path/
%BASE:http://host/a/
%EXPECT:http://host/a/path/
%URL:httg:/myhost
%BASE:http://host/a
%EXPECT:httg:/myhost
%URL:https:/myhost
%BASE:http://host/a
%EXPECT:https://myhost/
%URL:/b/../c
%BASE:http://host/a?b#c
%EXPECT:http://host/c
%URL:bc/de?query#ref
%BASE:http://host/a/
%EXPECT:http://host/a/bc/de?query#ref
%URL:..
%BASE:http://host/a/
%EXPECT:http://host/
%URL:./..
%BASE:http://host/a/
%EXPECT:http://host/
%URL:../.
%BASE:http://host/a/
%EXPECT:http://host/
%URL:../../../foo
%BASE:http://host/a?query#ref
%EXPECT:http://host/foo
%URL:?
%BASE:http://host/a?x=y#z
%EXPECT:http://host/a?
%URL:?foo=bar#com
%BASE:http://host/a?x=y#z
%EXPECT:http://host/a?foo=bar#com
%URL:#ref
%BASE:http://host/a
%EXPECT:http://host/a#ref
%URL:#
%BASE:http://host/a#b
%EXPECT:http://host/a#
%URL:#bye
%BASE:http://host/a?foo=bar#hello
%EXPECT:http://host/a?foo=bar#bye
%URL:baz.html
%BASE:data:foobar
%EXPECT:
%URL:data:baz
%BASE:data:foobar
%EXPECT:data:baz
%URL:data:/base
%BASE:data:foobar
%EXPECT:data:/base
%URL:./asd:fgh
%BASE:http://foo/bar
%EXPECT:http://foo/asd:fgh
%URL: hello world
%BASE:http://foo/bar
%EXPECT:http://foo/hello%20world
%URL:///another/path
%BASE:http://host/a
%EXPECT:http://another/path
%URL://
%BASE:http://host/a
%EXPECT:
%URL:\\/another/path
%BASE:http://host/a
%EXPECT:http://another/path
%URL:/\\Another\\path
%BASE:http://host/a
%EXPECT:http://Another//path