From 24dfab4dd15ec65522250766c54b88c011894aed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Boutemy?= Date: Mon, 31 May 2021 21:30:07 +0200 Subject: [PATCH] add more values unit tests --- .../java/org/apache/maven/archiver/MavenArchiverTest.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java b/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java index 0d31ff9..029d3fb 100644 --- a/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java +++ b/src/test/java/org/apache/maven/archiver/MavenArchiverTest.java @@ -1441,8 +1441,14 @@ public void testParseOutputTimestamp() assertThat( archiver.parseOutputTimestamp( "." ) ).isNull(); assertThat( archiver.parseOutputTimestamp( " " ) ).isNull(); assertThat( archiver.parseOutputTimestamp( "_" ) ).isNull(); + assertThat( archiver.parseOutputTimestamp( "-" ) ).isNull(); + assertThat( archiver.parseOutputTimestamp( "/" ) ).isNull(); + assertThat( archiver.parseOutputTimestamp( "!" ) ).isNull(); + assertThat( archiver.parseOutputTimestamp( "*" ) ).isNull(); assertThat( archiver.parseOutputTimestamp( "1570300662" ).getTime() ).isEqualTo( 1570300662000L ); + assertThat( archiver.parseOutputTimestamp( "0" ).getTime() ).isEqualTo( 0L ); + assertThat( archiver.parseOutputTimestamp( "1" ).getTime() ).isEqualTo( 1000L ); assertThat( archiver.parseOutputTimestamp( "2019-10-05T18:37:42Z" ).getTime() ).isEqualTo( 1570300662000L ); assertThat( archiver.parseOutputTimestamp( "2019-10-05T20:37:42+02:00" ).getTime() ).isEqualTo(