Add a test for "%e" to wxDateTime::ParseFormat()

See https://github.com/wxWidgets/wxWidgets/pull/1842
This commit is contained in:
Vadim Zeitlin
2020-05-09 23:23:31 +02:00
parent 2cf0537722
commit 3ab187f75f

View File

@@ -868,6 +868,10 @@ void DateTimeTestCase::TestTimeFormat()
CPPUNIT_ASSERT( dt.ParseFormat("12:23:45.000", "%H:%M:%S.%l") );
CPPUNIT_ASSERT_EQUAL( 0, dt.GetMillisecond() );
// test another format modifier not testes above.
CPPUNIT_ASSERT( dt.ParseFormat("23", "%e") );
CPPUNIT_ASSERT_EQUAL( 23, dt.GetDay() );
// test partially specified dates too
wxDateTime dtDef(26, wxDateTime::Sep, 2008);
CPPUNIT_ASSERT( dt.ParseFormat("17", "%d", dtDef) );