From 3ab187f75f9de90734de4357f592849ece096724 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 9 May 2020 23:23:31 +0200 Subject: [PATCH] Add a test for "%e" to wxDateTime::ParseFormat() See https://github.com/wxWidgets/wxWidgets/pull/1842 --- tests/datetime/datetimetest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/datetime/datetimetest.cpp b/tests/datetime/datetimetest.cpp index 1638afe0ba..a530b658ec 100644 --- a/tests/datetime/datetimetest.cpp +++ b/tests/datetime/datetimetest.cpp @@ -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) );