mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-09 07:08:49 -04:00
Update test zim file.
zim files have been created using a recent version of zimwriterfs (including the fix for openzim/zim-tools#355
This commit is contained in:
parent
61faa65343
commit
c7ac3a0878
Binary file not shown.
Binary file not shown.
@ -49,14 +49,18 @@ public class test {
|
|||||||
private void testArchive(TestArchive archive)
|
private void testArchive(TestArchive archive)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
// test the zim file main page title
|
// test the zim file main page title
|
||||||
assertEquals("Test ZIM file", archive.getMainEntry().getTitle());
|
TestEntry mainPage = archive.getMainEntry();
|
||||||
// test zim file size
|
assertEquals("mainPage", mainPage.getTitle());
|
||||||
assertEquals(4070, archive.getFilesize()); // The file size is in KiB
|
assertEquals("Test ZIM file", mainPage.getItem(true).getTitle());
|
||||||
// test zim file main url
|
// test zim file main url
|
||||||
assertEquals("A/main.html", archive.getMainEntry().getPath());
|
assertEquals("mainPage", mainPage.getPath());
|
||||||
|
assertEquals("main.html", mainPage.getItem(true).getPath());
|
||||||
|
|
||||||
|
// test zim file size
|
||||||
|
assertEquals(66910, archive.getFilesize()); // The file size is in KiB
|
||||||
// test zim file content
|
// test zim file content
|
||||||
byte[] mainData = getFileContent("small_zimfile_data/main.html");
|
byte[] mainData = getFileContent("small_zimfile_data/main.html");
|
||||||
byte[] inZimMainData = archive.getEntryByPath("A/main.html").getItem(true).getData().getData();
|
byte[] inZimMainData = archive.getEntryByPath("main.html").getItem(true).getData().getData();
|
||||||
assert(Arrays.equals(mainData, inZimMainData));
|
assert(Arrays.equals(mainData, inZimMainData));
|
||||||
|
|
||||||
// test zim file icon
|
// test zim file icon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user