changes for use of _WIN32 define on windows

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39492 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2016-03-09 13:16:16 +00:00
parent 8904edf3fe
commit 62d2bcbabc
46 changed files with 303 additions and 251 deletions

View file

@ -200,7 +200,7 @@ NSLog(@"Developer: %@", NSSearchPathForDirectoriesInDomains(NSDeveloperDirectory
isEqual: @"~/nil"],
"'~/nil' stringByExpandingTildeInPath: != '~/nil'");
#if defined(__MINGW32__)
#if defined(_WIN32)
{
NSString *s = [@"~" stringByAppendingString: NSUserName()];
PASS(![[s stringByExpandingTildeInPath] isEqual: s],
@ -308,7 +308,7 @@ NSLog(@"Developer: %@", NSSearchPathForDirectoriesInDomains(NSDeveloperDirectory
[fm removeFileAtPath: tmpsrc handler: nil];
[fm createSymbolicLinkAtPath: tmpsrc pathContent: tmpdst];
#if !defined(__MINGW32__)
#if !defined(_WIN32)
PASS_EQUAL([tmpsrc stringByStandardizingPath], tmpsrc,
"foo->bar symlink not expanded by stringByStandardizingPath")
PASS_EQUAL([tmpsrc stringByResolvingSymlinksInPath], tmpdst,
@ -346,7 +346,7 @@ NSLog(@"Developer: %@", NSSearchPathForDirectoriesInDomains(NSDeveloperDirectory
PASS([@"home" isAbsolutePath] == NO,
"'home' isAbsolutePath == NO");
#if defined(__MINGW32__)
#if defined(_WIN32)
PASS([@"/home" isAbsolutePath] == NO,
"'/home' isAbsolutePath == NO");
PASS([@"//host/share" isAbsolutePath] == NO,

View file

@ -56,7 +56,7 @@ int main()
[outPipe release];
[task release];
#if !defined(__MINGW32__)
#if !defined(_WIN32)
task = [[NSTask alloc] init];
[task setLaunchPath:
[helpers stringByAppendingPathComponent: @"processgroup"]];

View file

@ -77,7 +77,7 @@ int main()
PASS([str isEqual: @"http://www.w3.org/silly-file-path/"],
"Abs of http://www.w3.org/silly-file-path/ is correct");
#if defined(__MINGW32__)
#if defined(_WIN32)
url = [NSURL fileURLWithPath: @"C:\\WINDOWS"];
str = [url path];
PASS_EQUAL(str, @"C:\\WINDOWS",
@ -239,7 +239,7 @@ int main()
//NSLog(@"with link %@, obtained URL: %@ String: %@", str, rel, [rel absoluteString]);
PASS([[rel absoluteString] isEqual: @"file://localhost/System/Library/Documentation/Developer/Gui/Reference/NSApplication.html#class$NSApplication"], "Adding relative file URL with fragment works");
#if defined(__MINGW32__)
#if defined(_WIN32)
GSPathHandling("unix");
#endif
@ -266,7 +266,7 @@ GSPathHandling("unix");
PASS_EQUAL([url relativeString], @"file://localhost/this%23is%20a%20Path%20with%20%25%20+%20=%20&%20%3C%20%3E%20%3F", "complex -relativeString");
PASS_EQUAL([url description], @"file://localhost/this%23is%20a%20Path%20with%20%25%20+%20=%20&%20%3C%20%3E%20%3F", "complex -description");
#if defined(__MINGW32__)
#if defined(_WIN32)
GSPathHandling("right");
#endif

View file

@ -82,6 +82,9 @@ int main()
END_SET("test4b")
START_SET("test5")
#ifdef _WIN32
GSPathHandling("unix");
#endif
NSURL *url = [NSURL fileURLWithPath: @"/this#is a Path with % < > ?"];
PASS_EQUAL([url scheme], @"file", "scheme");
PASS_EQUAL([url host], @"localhost", "host");