mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +00:00
Fix error in test compilation
This commit is contained in:
parent
cf13a7c21b
commit
d691df9cbf
1 changed files with 7 additions and 6 deletions
|
@ -5,18 +5,19 @@
|
|||
|
||||
int main()
|
||||
{
|
||||
NSURLComponents *components = nil;
|
||||
|
||||
START_SET("components");
|
||||
|
||||
NSURLComponents *components = [NSURLComponents componentsWithURL:[NSURL URLWithString:@"https://user:password@some.host.com"] resolvingAgainstBaseURL:NO];
|
||||
components = [NSURLComponents componentsWithURL:[NSURL URLWithString:@"https://user:password@some.host.com"] resolvingAgainstBaseURL:NO];
|
||||
|
||||
[components setQueryItems: [NSArray arrayWithObjects:
|
||||
[NSURLQueryItem queryItemWithName:@"lang" value:@"en"],
|
||||
[NSURLQueryItem queryItemWithName:@"response_type" value:@"code"],
|
||||
[NSURLQueryItem queryItemWithName:@"uri" value:[NSURL URLWithString:@"https://some.url.com/path?param1=one¶m2=two"].absoluteString],
|
||||
nil]];
|
||||
[NSURLQueryItem queryItemWithName:@"lang" value:@"en"],
|
||||
[NSURLQueryItem queryItemWithName:@"response_type" value:@"code"],
|
||||
[NSURLQueryItem queryItemWithName:@"uri" value:[[NSURL URLWithString:@"https://some.url.com/path?param1=one¶m2=two"] absoluteString]], nil]];
|
||||
// URL
|
||||
PASS([[components string] isEqualToString:
|
||||
@"https://user:password@some.host.com/?lang=en&response_type=code&uri=https://some.url.com/path?param1%3Done%26param2%3Dtwo"],
|
||||
@"https://user:password@some.host.com/?lang=en&response_type=code&uri=https://some.url.com/path?param1%3Done%26param2%3Dtwo"],
|
||||
"URL string is correct");
|
||||
// NOTE: The slash behind the .com is strictly legal, but this is NOT what is produced by macOS. I would like to correct this in a
|
||||
// future release.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue