mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Merge pull request #256 from gnustep/msvc-test-fixes
GSTLS, NSData, NSString Unit Test Fixes on Windows MSVC
This commit is contained in:
commit
f5a983a037
4 changed files with 26 additions and 9 deletions
|
@ -7,6 +7,15 @@
|
|||
* Tests/base/NSTask/notify.m:
|
||||
Conditionally use .exe suffix in executable paths.
|
||||
|
||||
2022-08-04 Hugo Melder <contact@hugomelder.com>
|
||||
|
||||
* Tests/base/GSTLS/basic.m:
|
||||
Disable test completly if gnutls is not present.
|
||||
* Tests/base/NSData/additions.m:
|
||||
Check if dataWithContentsOfFile: returns an instance.
|
||||
* Tests/base/NSString/tilde.m:
|
||||
Skip tilde abbreviation test on Windows.
|
||||
|
||||
2022-08-04 Hugo Melder <contact@hugomelder.com>
|
||||
|
||||
* Tests/base/coding/basictypes.m:
|
||||
|
|
|
@ -36,16 +36,15 @@ START_SET("TLS support")
|
|||
#endif
|
||||
[dateFormatter release];
|
||||
PASS_EQUAL([c expiresAt], expiresAt,
|
||||
"Expiration for entire list is that of the single item")
|
||||
#else
|
||||
SKIP("TLS support disabled");
|
||||
#endif
|
||||
|
||||
"Expiration for entire list is that of the single item");
|
||||
|
||||
cred = [GSTLSCredentials selfSigned: YES];
|
||||
NSLog(@"%@", cred);
|
||||
PASS(cred != nil, "generates self signed certificate");
|
||||
|
||||
#else
|
||||
SKIP("TLS support disabled");
|
||||
#endif
|
||||
|
||||
END_SET("TLS support");
|
||||
DESTROY(arp);
|
||||
return 0;
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
int main()
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
|
||||
START_SET("NSData Additions")
|
||||
#if USE_ZLIB
|
||||
NSData *data;
|
||||
NSData *ref;
|
||||
|
@ -67,6 +69,7 @@ int main()
|
|||
#else
|
||||
SKIP("zlib support disabled");
|
||||
#endif
|
||||
END_SET("NSData Additions")
|
||||
|
||||
[arp release]; arp = nil;
|
||||
return 0;
|
||||
|
|
|
@ -32,8 +32,10 @@ int main()
|
|||
PASS_EQUAL([tmp stringByAbbreviatingWithTildeInPath], @"~/Documents/./..",
|
||||
"dot directory reference retained");
|
||||
|
||||
#ifndef _WIN32
|
||||
/* This test can't work on windows, because the ome directory of a
|
||||
#if defined(_WIN32)
|
||||
SKIP("multiple slashes can't be removed on Windows")
|
||||
#else
|
||||
/* This test can't work on windows, because the home directory of a
|
||||
* user doesn't start with a slash... don't run it on _WIN32
|
||||
*/
|
||||
tmp = [NSString stringWithFormat: @"////%@//Documents///", home];
|
||||
|
@ -52,9 +54,12 @@ int main()
|
|||
END_SET("tilde")
|
||||
|
||||
START_SET("tilde abbreviation for other home")
|
||||
|
||||
#if defined(_WIN32)
|
||||
SKIP("tilde abbreviation test not implemented on Windows")
|
||||
#else
|
||||
NSString *home = NSHomeDirectory();
|
||||
NSString *tmp;
|
||||
|
||||
/* The idea here is to use a home directory for a user other than the
|
||||
* current one. We pick root as a user which will exist on most systems.
|
||||
* If the current user is root then this will not work, so we skip the
|
||||
|
@ -71,6 +76,7 @@ int main()
|
|||
}
|
||||
PASS_EQUAL([tmp stringByAbbreviatingWithTildeInPath], tmp,
|
||||
"tilde does nothing for root's home");
|
||||
#endif
|
||||
|
||||
END_SET("tilde abbreviation for other home")
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue