variosu fixes to the tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,7 +92,7 @@
|
|||||||
#undef TEST_ALL
|
#undef TEST_ALL
|
||||||
static const bool TEST_ALL = TRUE;
|
static const bool TEST_ALL = TRUE;
|
||||||
#else
|
#else
|
||||||
#define TEST_EXECUTE
|
#define TEST_DATETIME
|
||||||
|
|
||||||
static const bool TEST_ALL = FALSE;
|
static const bool TEST_ALL = FALSE;
|
||||||
#endif
|
#endif
|
||||||
@@ -316,7 +316,7 @@ static void TestDirEnum()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDir dir(_T("s:/tmp/foo"));
|
wxDir dir(cwd);
|
||||||
if ( !dir.IsOpened() )
|
if ( !dir.IsOpened() )
|
||||||
{
|
{
|
||||||
wxPrintf(_T("ERROR: failed to open current directory '%s'.\n"), cwd.c_str());
|
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);
|
TestDirEnumHelper(dir, wxDIR_DEFAULT | wxDIR_DOTDOT);
|
||||||
|
|
||||||
wxPuts(_T("Enumerating object files in current directory:"));
|
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:"));
|
wxPuts(_T("Enumerating directories in current directory:"));
|
||||||
TestDirEnumHelper(dir, wxDIR_DIRS);
|
TestDirEnumHelper(dir, wxDIR_DIRS);
|
||||||
@@ -2194,13 +2194,19 @@ static void TestLongLongPrint()
|
|||||||
|
|
||||||
#ifdef TEST_PATHLIST
|
#ifdef TEST_PATHLIST
|
||||||
|
|
||||||
|
#ifdef __UNIX__
|
||||||
|
#define CMD_IN_PATH _T("ls")
|
||||||
|
#else
|
||||||
|
#define CMD_IN_PATH _T("command.com")
|
||||||
|
#endif
|
||||||
|
|
||||||
static void TestPathList()
|
static void TestPathList()
|
||||||
{
|
{
|
||||||
wxPuts(_T("*** Testing wxPathList ***\n"));
|
wxPuts(_T("*** Testing wxPathList ***\n"));
|
||||||
|
|
||||||
wxPathList pathlist;
|
wxPathList pathlist;
|
||||||
pathlist.AddEnvList("PATH");
|
pathlist.AddEnvList(_T("PATH"));
|
||||||
wxString path = pathlist.FindValidPath("ls");
|
wxString path = pathlist.FindValidPath(CMD_IN_PATH);
|
||||||
if ( path.empty() )
|
if ( path.empty() )
|
||||||
{
|
{
|
||||||
wxPrintf(_T("ERROR: command not found in the path.\n"));
|
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") },
|
{ CompareBoth, _T("Date is %x, time is %X") },
|
||||||
{ CompareTime, _T("Time is %H:%M:%S or %I:%M:%S %p") },
|
{ CompareTime, _T("Time is %H:%M:%S or %I:%M:%S %p") },
|
||||||
{ CompareNone, _T("The day of year: %j, the week of year: %W") },
|
{ 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[] =
|
static const Date formatTestDates[] =
|
||||||
@@ -6150,6 +6156,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
TestTimeZoneBug();
|
TestTimeZoneBug();
|
||||||
}
|
}
|
||||||
|
TestTimeFormat();
|
||||||
|
|
||||||
if ( TEST_INTERACTIVE )
|
if ( TEST_INTERACTIVE )
|
||||||
TestDateTimeInteractive();
|
TestDateTimeInteractive();
|
||||||
|
Reference in New Issue
Block a user