add some percent escape tests

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34860 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-03-02 08:55:27 +00:00
parent 97b04c6d4e
commit c7d0d1c1f5

View file

@ -186,6 +186,18 @@ int main()
PASS([url scheme] == nil,
"empty string gives nil scheme");
url = [NSURL URLWithString: @"/%65"];
PASS_EQUAL([url path], @"/e",
"escapes are decoded in path");
url = [NSURL URLWithString: @"/%3D"];
PASS_EQUAL([url path], @"/=",
"uppercase percent escape for '=' in path");
url = [NSURL URLWithString: @"/%3d"];
PASS_EQUAL([url path], @"/=",
"lowercase percent escape for '=' in path");
url = [NSURL URLWithString: @"aaa%20ccc/"];
PASS([[url absoluteString] isEqual: @"aaa%20ccc/"],
"absolute URL absoluteString works with encoded space");