add more URL checks

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34698 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-02-02 17:00:07 +00:00
parent 8199943aef
commit 5272cb5ae8

View file

@ -121,6 +121,16 @@ int main()
"Simple relative URL fullPath works");
#endif
url = [NSURL URLWithString: @"http://1.2.3.4/a?b;foo"];
PASS_EQUAL([url absoluteString], @"http://1.2.3.4/a?b;foo",
"query and params not escaped");
url = [[[NSURL alloc] initWithScheme: @"http"
host: @"1.2.3.4"
path: @"/a?b;foo"] autorelease];
PASS_EQUAL([url absoluteString], @"http://1.2.3.4/a?b;foo",
"query and params not escaped");
url = [NSURL URLWithString: @"http://here.and.there/testing/one.html"];
rel = [NSURL URLWithString: @"/aaa/bbb/ccc/" relativeToURL: url];
PASS([[rel absoluteString]