]> git.saurik.com Git - wxWidgets.git/commitdiff
variosu fixes to the tests
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Sep 2002 23:11:18 +0000 (23:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 8 Sep 2002 23:11:18 +0000 (23:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/console/console.cpp

index 634f988399c1e291f9776d7eeef0be29a114a6b6..50f3b64d5aee17a6d63bdf099c34880220409378 100644 (file)
@@ -92,7 +92,7 @@
     #undef TEST_ALL
     static const bool TEST_ALL = TRUE;
 #else
-    #define TEST_EXECUTE
+    #define TEST_DATETIME
 
     static const bool TEST_ALL = FALSE;
 #endif
@@ -316,7 +316,7 @@ static void TestDirEnum()
         return;
     }
 
-    wxDir dir(_T("s:/tmp/foo"));
+    wxDir dir(cwd);
     if ( !dir.IsOpened() )
     {
         wxPrintf(_T("ERROR: failed to open current directory '%s'.\n"), cwd.c_str());
@@ -330,7 +330,7 @@ static void TestDirEnum()
     TestDirEnumHelper(dir, wxDIR_DEFAULT | wxDIR_DOTDOT);
 
     wxPuts(_T("Enumerating object files in current directory:"));
-    TestDirEnumHelper(dir, wxDIR_DEFAULT, "*.o");
+    TestDirEnumHelper(dir, wxDIR_DEFAULT, "*.o*");
 
     wxPuts(_T("Enumerating directories in current directory:"));
     TestDirEnumHelper(dir, wxDIR_DIRS);
@@ -2194,13 +2194,19 @@ static void TestLongLongPrint()
 
 #ifdef TEST_PATHLIST
 
+#ifdef __UNIX__
+    #define CMD_IN_PATH _T("ls")
+#else
+    #define CMD_IN_PATH _T("command.com")
+#endif
+
 static void TestPathList()
 {
     wxPuts(_T("*** Testing wxPathList ***\n"));
 
     wxPathList pathlist;
-    pathlist.AddEnvList("PATH");
-    wxString path = pathlist.FindValidPath("ls");
+    pathlist.AddEnvList(_T("PATH"));
+    wxString path = pathlist.FindValidPath(CMD_IN_PATH);
     if ( path.empty() )
     {
         wxPrintf(_T("ERROR: command not found in the path.\n"));
@@ -4367,7 +4373,7 @@ static void TestTimeFormat()
        { CompareBoth, _T("Date is %x, time is %X") },
        { CompareTime, _T("Time is %H:%M:%S or %I:%M:%S %p") },
        { CompareNone, _T("The day of year: %j, the week of year: %W") },
-       { CompareDate, _T("ISO date without separators: %4Y%2m%2d") },
+       { CompareDate, _T("ISO date without separators: %Y%m%d") },
     };
 
     static const Date formatTestDates[] =
@@ -6150,6 +6156,7 @@ int main(int argc, char **argv)
 
         TestTimeZoneBug();
     }
+        TestTimeFormat();
 
     if ( TEST_INTERACTIVE )
         TestDateTimeInteractive();