Tests/base/NSURL/basic.m: Use https://gnustep.github.io instead of http://example.com

http://example.com/silly-file-name is currently returning 500 instead of 404, breaking tests.  Use https://gnustep.github.io instead.
This commit is contained in:
Frederik Carlier 2024-03-27 13:09:39 +00:00 committed by Ivan Vučica
parent 07d17a16a7
commit 3415de14c0

View file

@ -56,22 +56,22 @@ int main()
url = [NSURL URLWithString:@"this isn't a URL"]; url = [NSURL URLWithString:@"this isn't a URL"];
PASS(url == nil, "URL with 'this isn't a URL' returns nil"); PASS(url == nil, "URL with 'this isn't a URL' returns nil");
url = [NSURL URLWithString: @"http://example.com/silly-file-name"]; url = [NSURL URLWithString: @"https://gnustep.github.io/silly-file-name"];
data = [url resourceDataUsingCache: NO]; data = [url resourceDataUsingCache: NO];
num = [url propertyForKey: NSHTTPPropertyStatusCodeKey]; num = [url propertyForKey: NSHTTPPropertyStatusCodeKey];
PASS_EQUAL(num, [NSNumber numberWithInt: 404], PASS_EQUAL(num, [NSNumber numberWithInt: 404],
"Status of load is 404 for example.com/silly-file-name"); "Status of load is 404 for gnustep.github.io/silly-file-name");
str = [url scheme]; str = [url scheme];
PASS([str isEqual: @"http"], PASS([str isEqual: @"https"],
"Scheme of http://example.com/silly-file-name is http"); "Scheme of https://gnustep.github.io/silly-file-name is https");
str = [url host]; str = [url host];
PASS([str isEqual: @"example.com"], PASS([str isEqual: @"gnustep.github.io"],
"Host of http://example.com/silly-file-name is example.com"); "Host of https://gnustep.github.io/silly-file-name is gnustep.github.io");
str = [url path]; str = [url path];
PASS([str isEqual: @"/silly-file-name"], PASS([str isEqual: @"/silly-file-name"],
"Path of http://example.com/silly-file-name is /silly-file-name"); "Path of https://gnustep.github.io/silly-file-name is /silly-file-name");
PASS([[url resourceSpecifier] isEqual: @"//example.com/silly-file-name"], PASS([[url resourceSpecifier] isEqual: @"//gnustep.github.io/silly-file-name"],
"resourceSpecifier of http://example.com/silly-file-name is //example.com/silly-file-name"); "resourceSpecifier of https://gnustep.github.io/silly-file-name is //gnustep.github.io/silly-file-name");
url = [NSURL URLWithString: @"http://example.com/silly-file-path/"]; url = [NSURL URLWithString: @"http://example.com/silly-file-path/"];