mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
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:
parent
8199943aef
commit
5272cb5ae8
1 changed files with 10 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue