Author: rfm
Date: Mon Aug 24 11:25:24 2015
New Revision: 38922

URL: http://svn.gna.org/viewcvs/gnustep?rev=38922&view=rev
Log:
need windows.h before winsock2.h

Modified:
    libs/base/trunk/Source/win32/GSFileHandle.m
    libs/base/trunk/Tests/base/NSFileManager/general.m

Modified: libs/base/trunk/Source/win32/GSFileHandle.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Source/win32/GSFileHandle.m?rev=38922&r1=38921&r2=38922&view=diff
==============================================================================
--- libs/base/trunk/Source/win32/GSFileHandle.m (original)
+++ libs/base/trunk/Source/win32/GSFileHandle.m Mon Aug 24 11:25:24 2015
@@ -22,6 +22,7 @@
    Boston, MA 02111 USA.
    */
 
+#include <windows.h>
 #include <winsock2.h>
 
 #include "common.h"

Modified: libs/base/trunk/Tests/base/NSFileManager/general.m
URL: 
http://svn.gna.org/viewcvs/gnustep/libs/base/trunk/Tests/base/NSFileManager/general.m?rev=38922&r1=38921&r2=38922&view=diff
==============================================================================
--- libs/base/trunk/Tests/base/NSFileManager/general.m  (original)
+++ libs/base/trunk/Tests/base/NSFileManager/general.m  Mon Aug 24 11:25:24 2015
@@ -15,6 +15,7 @@
   NSDictionary *attr;
   NSString *dirInDir;
   NSString *str1,*str2;
+  NSString *tmp;
   NSError *err;
   NSDictionary *errInfo;
   BOOL exists;
@@ -174,8 +175,10 @@
              attributes: nil];
   PASS(NO == [mgr contentsEqualAtPath: @"sub1/x" andPath: @"sub2/x"],
     "directories containing files with different content are not equal");
-  [mgr removeFileAtPath: @"sub1" handler: nil];
-  [mgr removeFileAtPath: @"sub2" handler: nil];
+  PASS(YES == [mgr removeFileAtPath: @"sub1" handler: nil],
+    "sub1 removed");
+  PASS(YES == [mgr removeFileAtPath: @"sub2" handler: nil],
+    "sub2 removed");
 
   err = nil;
   PASS([mgr createDirectoryAtPath: dirInDir
@@ -198,13 +201,25 @@
   PASS([mgr fileExistsAtPath: dirInDir isDirectory: &isDir] && isDir == YES,
     "NSFileManager create directory and intermediate directory");
 
-  [mgr changeCurrentDirectoryPath: [[[mgr currentDirectoryPath] 
stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]];
+  tmp = [mgr currentDirectoryPath];
+  exists = [mgr fileExistsAtPath: tmp isDirectory: &isDir];
+  PASS(YES == exists && YES == isDir, "current directory exists");
+  tmp = [tmp stringByDeletingLastPathComponent];
+  exists = [mgr fileExistsAtPath: tmp isDirectory: &isDir];
+  PASS(YES == exists && YES == isDir, "parent directory exists");
+  tmp = [tmp stringByDeletingLastPathComponent];
+  exists = [mgr fileExistsAtPath: tmp isDirectory: &isDir];
+  PASS(YES == exists && YES == isDir, "parent of parent directory exists");
+  [mgr changeCurrentDirectoryPath: tmp];
   exists = [mgr fileExistsAtPath: dir isDirectory: &isDir];
+  PASS(YES == exists && YES == isDir, "directory exists");
   if (exists && isDir)
     {
-      PASS([mgr removeFileAtPath: dir handler: nil],
-           "NSFileManager removes a directory");
-      PASS(![mgr fileExistsAtPath: dir],"directory no longer exists");
+      dir - [dir stringByStandardizingPath];
+      PASS([mgr removeFileAtPath: dir handler: nil], "removed directory");
+      PASS(![mgr fileExistsAtPath: dir], "directory no longer exists");
+GSPrintf(stdout, @"%@\n", dir);
+GSPrintf(stderr, @"%@\n", dir);
     }
   
   err = nil;


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to