]> git.saurik.com Git - wxWidgets.git/commitdiff
Correct the expected result of directory existence check.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 21 Jun 2010 12:19:14 +0000 (12:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 21 Jun 2010 12:19:14 +0000 (12:19 +0000)
As /.. is the same as /, a directory with any number of ".." in it will always
exist.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64667 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/file/dir.cpp

index 50b5b710520f3c30d88a864fe64cca24aa0a289d..66e5bbd64712613d2a2593ad65a62ca86cc89c5d 100644 (file)
@@ -79,7 +79,7 @@ void DirTestCase::setUp()
     wxDir::Make(DIRTEST_FOLDER + SEP + "folder1" + SEP + "subfolder2", wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
     wxDir::Make(DIRTEST_FOLDER + SEP + "folder2", wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
     wxDir::Make(DIRTEST_FOLDER + SEP + "folder3" + SEP + "subfolder1", wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
     wxDir::Make(DIRTEST_FOLDER + SEP + "folder1" + SEP + "subfolder2", wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
     wxDir::Make(DIRTEST_FOLDER + SEP + "folder2", wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
     wxDir::Make(DIRTEST_FOLDER + SEP + "folder3" + SEP + "subfolder1", wxS_DIR_DEFAULT, wxPATH_MKDIR_FULL);
-    
+
     CreateTempFile(DIRTEST_FOLDER + SEP + "folder1" + SEP + "subfolder2" + SEP + "dummy");
     CreateTempFile(DIRTEST_FOLDER + SEP + "dummy");
 }
     CreateTempFile(DIRTEST_FOLDER + SEP + "folder1" + SEP + "subfolder2" + SEP + "dummy");
     CreateTempFile(DIRTEST_FOLDER + SEP + "dummy");
 }
@@ -172,14 +172,13 @@ void DirTestCase::DirExists()
     {
         const char *dirname;
         bool shouldExist;
     {
         const char *dirname;
         bool shouldExist;
-    } testData[] = 
+    } testData[] =
     {
         { ".", true },
         { "..", true },
 #if defined(__WXMSW__)
         { "..\\..", true },
     {
         { ".", true },
         { "..", true },
 #if defined(__WXMSW__)
         { "..\\..", true },
-        { "..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..", /*false*/ true },
-                // FIXME: should fail but it doesn't... looks like a bug in GetFileAttributes() win API
+        { "..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..\\..", true },
         { "c:", true },
         { "c:\\", true },
         { "c:\\\\", true },
         { "c:", true },
         { "c:\\", true },
         { "c:\\\\", true },
@@ -190,7 +189,7 @@ void DirTestCase::DirExists()
         { "test.exe", false }       // not a directory!
 #elif defined(__UNIX__)
         { "../..", true },
         { "test.exe", false }       // not a directory!
 #elif defined(__UNIX__)
         { "../..", true },
-        { "../../../../../../../../../../../../../../../../../../../..", false },
+        { "../../../../../../../../../../../../../../../../../../../..", true },
         { "/", true },
         { "//", true },
         { "/usr/bin", true },
         { "/", true },
         { "//", true },
         { "/usr/bin", true },