]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/file/dir.cpp
Remove the WebView - wxWebViewWebKit map as our policy delegates already held a point...
[wxWidgets.git] / tests / file / dir.cpp
index 71e959cc5728e34555ae430fbf41e4cf0e26df58..c1092139092439dda3b03c8fee36dd5c73cb7f67 100644 (file)
@@ -182,13 +182,13 @@ void DirTestCase::DirExists()
         { "$USER_DOCS_DIR\\", true },
         { "$USER_DOCS_DIR\\\\", true },
         { "..\\..", true },
-        { "c:", true },
-        { "c:\\", true },
-        { "c:\\\\", true },
+        { "$MSW_DRIVE", true },
+        { "$MSW_DRIVE\\", true },
+        { "$MSW_DRIVE\\\\", true },
         { "\\\\non_existent_share\\file", false },
-        { "c:\\a\\directory\\which\\does\\not\\exist", false },
-        { "c:\\a\\directory\\which\\does\\not\\exist\\", false },
-        { "c:\\a\\directory\\which\\does\\not\\exist\\\\", false },
+        { "$MSW_DRIVE\\a\\directory\\which\\does\\not\\exist", false },
+        { "$MSW_DRIVE\\a\\directory\\which\\does\\not\\exist\\", false },
+        { "$MSW_DRIVE\\a\\directory\\which\\does\\not\\exist\\\\", false },
         { "test.exe", false }            // not a directory!
 #elif defined(__UNIX__)
         { "../..", true },
@@ -202,11 +202,21 @@ void DirTestCase::DirExists()
 #endif
     };
 
+#ifdef __WXMSW__
+    wxString homedrive = wxGetenv("HOMEDRIVE");
+    if ( homedrive.empty() )
+        homedrive = "c:";
+#endif // __WXMSW__
+
     for ( size_t n = 0; n < WXSIZEOF(testData); n++ )
     {
         wxString dirname = testData[n].dirname;
         dirname.Replace("$USER_DOCS_DIR", wxStandardPaths::Get().GetDocumentsDir());
-        
+
+#ifdef __WXMSW__
+        dirname.Replace("$MSW_DRIVE", homedrive);
+#endif // __WXMSW__
+
         std::string errDesc = wxString::Format("failed on directory '%s'", dirname).ToStdString();
         CPPUNIT_ASSERT_EQUAL_MESSAGE(errDesc, testData[n].shouldExist, wxDir::Exists(dirname));