Skip to content

Commit dc565b0

Browse files
committed
test 1970 timestamp
1 parent d88dfdc commit dc565b0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/test/java/org/codehaus/plexus/archiver/zip/ZipArchiverTest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -816,6 +816,12 @@ void testFixedEntryModificationTime() throws IOException {
816816
assertEquals(almostMinDosTime, zf.getEntry("file-with-odd-time.txt").getTime());
817817
assertEquals(almostMinDosTime, zf.getEntry("foo/").getTime());
818818
}
819+
820+
final File zipFile1970 = getTestFile("target/output/zip-with-fixed-entry-modification-times-1970.zip");
821+
final ZipArchiver archiver1970 = getZipArchiver(zipFile1970);
822+
archiver1970.setLastModifiedTime(FileTime.fromMillis(0));
823+
archiver1970.addDirectory(new File("src/test/resources/zip-timestamp"));
824+
archiver1970.createArchive();
819825
}
820826

821827
@Test

0 commit comments

Comments
 (0)