type 1

%URL:http://example.com
%EXPECT:http://example.com/

%URL:http://example.com/
%EXPECT:http://example.com/

%URL:http://example.com/a
%EXPECT:http://example.com/a

%URL:http://example.com/a/
%EXPECT:http://example.com/a/

%URL:http://example.com/a/b/c
%EXPECT:http://example.com/a/b/c

%URL:http://example.com/a/b/c/
%EXPECT:http://example.com/a/b/c/

%URL:http://example.com/././c
%EXPECT:http://example.com/c

%URL:http://example.com/././.c
%EXPECT:http://example.com/.c

%URL:http://www.example.com/a/.
%EXPECT:http://www.example.com/a/

%URL:http://www.example.com/a/./
%EXPECT:http://www.example.com/a/

%URL:http://www.example.com/a/b/..
%EXPECT:http://www.example.com/a/

%URL:http://www.example.com/foo/bar/../
%EXPECT:http://www.example.com/foo/

%URL:http://www.example.com/a/..bar
%EXPECT:http://www.example.com/a/..bar

%URL:http://www.example.com/a/b/../ton
%EXPECT:http://www.example.com/a/ton

%URL:http://www.example.com/a/b/../d/../../g
%EXPECT:http://www.example.com/g

%URL:http://www.example.com/a/../../..
%EXPECT:http://www.example.com/

%URL:http://www.example.com/a/../../../e
%EXPECT:http://www.example.com/e

%URL:http://www.example.com/a/%2e
%EXPECT:http://www.example.com/a/

%URL:http://www.example.com////../..
%EXPECT:http://www.example.com//

%URL:http://www.example.com/a/b//../..
%EXPECT:http://www.example.com/a/

%URL:http://www.example.com/a/b//..
%EXPECT:http://www.example.com/a/b/

%URL:http://www.example.com/a/b/..
%EXPECT:http://www.example.com/a/

%URL:http://www.example.com/(%28:%3A%29)
%EXPECT:http://www.example.com/(%28:%3A%29)

%URL:http://www.example.com/%3A%3a%3C%3c
%EXPECT:http://www.example.com/%3A%3a%3C%3c

%URL:http://www.example.com/万abc
%EXPECT:http://www.example.com/%E4%B8%87abc

%URL:http://example.com/a/万
%EXPECT:http://example.com/a/%E4%B8%87

%URL:http://example.com/a/万/
%EXPECT:http://example.com/a/%E4%B8%87/

%URL:http://example.com/a/万/c/
%EXPECT:http://example.com/a/%E4%B8%87/c/

%URL:http://example.com/ a  /  b /  c /
%EXPECT:http://example.com/%20a%20%20/%20%20b%20/%20%20c%20/

%URL:http://example.com/a
/
b/c/

%EXPECT:http://example.com/a/b/c/

%URL:http://example.com/
a
/
b/c
/

%EXPECT:http://example.com/a/b/c/

%URL:http://example.com/a/b\c/d\e/f
%EXPECT:http://example.com/a/b/c/d/e/f

%URL:http://example.com\a\b\c\
%EXPECT:http://example.com/a/b/c/

%URL:http://example.com\a\b\c
%EXPECT:http://example.com/a/b/c

%URL:http://example.com\a
%EXPECT:http://example.com/a

%URL:http://example.com\a/
%EXPECT:http://example.com/a/

%URL:http://example.com\
%EXPECT:http://example.com/

%URL:file:C:\example\
%EXPECT:file:///C:/example/

%URL:file:///C:\example\
%EXPECT:file:///C:/example/

%URL:file:///C:\example\\\\\\\\
%EXPECT:file:///C:/example////////

%URL:file:///C:\\\\\\\\example\\\\\\\\
%EXPECT:file:///C:////////example////////

%URL:file:///C|\\\\\\\\example\\\\\\\\
%EXPECT:file:///C:////////example////////

%URL:file://C|\\\\\\\\example\\\\\\\\
%EXPECT:file:///C:////////example////////

%URL:file://C:\example\
%EXPECT:file:///C:/example/

%URL:file://C:\example\\\\\\\\
%EXPECT:file:///C:/example////////

%URL:file://C:\\\\\\\\example\\\\\\\\
%EXPECT:file:///C:////////example////////

%URL:file:///user/data/
%EXPECT:file:///user/data/

%URL:file://user/data/
%EXPECT:file://user/data/

%URL:file://user/data
%EXPECT:file://user/data

%URL:file:/user/data
%EXPECT:file:///user/data

%URL:file:/user
%EXPECT:file:///user

%URL:file:/
%EXPECT:file:///

%URL:file:
%EXPECT:file:///

%URL:file
%EXPECT:

%URL:file://localhost/C:/foo
%EXPECT:file:///C:/foo

%URL:file://localhost/foo
%EXPECT:file:///foo

%URL:\\\\another\\path
%EXPECT:

%URL:file:///C:/foo
%EXPECT:file:///C:/foo
