From ee3ef2817f095a3296f538d633fb218d5b97ff6a Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 8 Sep 2002 23:11:18 +0000 Subject: [PATCH] variosu fixes to the tests git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/console/console.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/samples/console/console.cpp b/samples/console/console.cpp index 634f988399..50f3b64d5a 100644 --- a/samples/console/console.cpp +++ b/samples/console/console.cpp @@ -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(); -- 2.45.2