mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Provisional IPv6 support added.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33933 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bc796f4304
commit
6b8dc7ef6c
11 changed files with 369 additions and 361 deletions
|
@ -11,25 +11,28 @@ int main()
|
|||
NSHost *tmp;
|
||||
|
||||
current = [NSHost currentHost];
|
||||
PASS(current != nil && [current isKindOfClass:[NSHost class]],
|
||||
PASS(current != nil && [current isKindOfClass: [NSHost class]],
|
||||
"NSHost understands +currentHost");
|
||||
|
||||
#if defined(GNUSTEP_BASE_LIBRARY)
|
||||
localh = [NSHost localHost];
|
||||
PASS(localh != nil && [localh isKindOfClass:[NSHost class]],
|
||||
PASS(localh != nil && [localh isKindOfClass: [NSHost class]],
|
||||
"NSHost understands +localHost");
|
||||
#else
|
||||
localh = current;
|
||||
#endif
|
||||
|
||||
tmp = [NSHost hostWithName:[current name]];
|
||||
PASS([tmp isEqualToHost:current], "NSHost understands +hostWithName:");
|
||||
tmp = [NSHost hostWithName: @"::1"];
|
||||
PASS([[tmp address] isEqual: @"::1"], "+hostWithName: works for IPV6 addr");
|
||||
|
||||
tmp = [NSHost hostWithName: [current name]];
|
||||
PASS([tmp isEqualToHost: current], "NSHost understands +hostWithName:");
|
||||
|
||||
tmp = [NSHost hostWithAddress:[current address]];
|
||||
PASS([tmp isEqualToHost:current], "NSHost understands +hostWithAddress:");
|
||||
tmp = [NSHost hostWithAddress: [current address]];
|
||||
PASS([tmp isEqualToHost: current], "NSHost understands +hostWithAddress:");
|
||||
|
||||
tmp = [NSHost hostWithName:@"127.0.0.1"];
|
||||
PASS(tmp != nil && [tmp isEqualToHost:localh],
|
||||
tmp = [NSHost hostWithName: @"127.0.0.1"];
|
||||
PASS(tmp != nil && [tmp isEqualToHost: localh],
|
||||
"NSHost understands [+hostWithName: 127.0.0.1]");
|
||||
|
||||
[arp release]; arp = nil;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue