Skip to content

Commit 3cf8bfd

Browse files
committed
test: fix TypeHandleTest::testCreateDate failing with non-english locale
1 parent f48afa8 commit 3cf8bfd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/test/java/org/apache/commons/cli/TypeHandlerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void testCreateClass() throws ParseException {
177177
@ParameterizedTest
178178
@MethodSource("createDateFixtures")
179179
void testCreateDate(final Date date) {
180-
assertEquals(date, TypeHandler.createDate(date.toString()));
180+
assertEquals(date, TypeHandler.createDate(new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy").format(date)));
181181
}
182182

183183
@Test

0 commit comments

Comments
 (0)