Skip to content

Commit 106c4a5

Browse files
tests/: test_open2(): new, checks MuPDF's handling of filetype/magic when opening documents.
We test all combinations of data and filetype, and check mupdf's behaviour is as expected.
1 parent b46290d commit 106c4a5

15 files changed

+1071
-0
lines changed

tests/resources/test_open2.cbz

1.06 MB
Binary file not shown.

tests/resources/test_open2.doc

28.5 KB
Binary file not shown.

tests/resources/test_open2.docx

13.2 KB
Binary file not shown.

tests/resources/test_open2.epub

829 KB
Binary file not shown.

tests/resources/test_open2.fb2

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<FictionBook xmlns="http://www.gribuser.ru/xml/fictionbook/2.0" xmlns:xlink="http://www.w3.org/1999/xlink">
3+
<description>
4+
<title-info>
5+
<genre>computers</genre>
6+
<author>
7+
<first-name>Chris</first-name>
8+
<last-name>Clark</last-name>
9+
</author>
10+
<book-title>Sample FB2 book</book-title>
11+
<annotation>
12+
<p>Short sample of a FictionBook2 book with simple metadata. Based on test_book.md from https://github.com/clach04/sample_reading_media</p>
13+
</annotation>
14+
<keywords>ebook,sample,markdown,fb2,FictionBook2</keywords>
15+
</title-info>
16+
<document-info>
17+
<author>
18+
<nickname>clach04</nickname>
19+
<home-page>https://github.com/clach04/sample_reading_media</home-page>
20+
</author>
21+
22+
<program-used>vim and scite</program-used>
23+
<src-url>https://github.com/clach04/sample_reading_media</src-url>
24+
<version>1.0</version>
25+
<history>
26+
<p>Initial version, written by hand.</p>
27+
</history>
28+
</document-info>
29+
</description>
30+
<body>
31+
<title>
32+
<p>This is a title</p>
33+
</title>
34+
35+
<section id="test-header-h1">
36+
<title>
37+
<p>Test Header h1</p>
38+
</title>
39+
40+
<p>A test paragraph.</p>
41+
<p>Another test paragraph.</p>
42+
</section>
43+
44+
<section id="another-test-header-h1">
45+
<title>
46+
<p>Another Test Header h1</p>
47+
</title>
48+
49+
<section id="a-test-header-h2">
50+
<title>
51+
<p>A Test Header h2</p>
52+
</title>
53+
54+
<section id="a-test-header-h3">
55+
<title>
56+
<p>A Test Header h3</p>
57+
</title>
58+
59+
<p>Yet more copy</p>
60+
</section>
61+
</section>
62+
</section>
63+
</body>
64+
</FictionBook>

tests/resources/test_open2.html

16.4 KB
Binary file not shown.

tests/resources/test_open2.jpg

49.6 KB
Loading

tests/resources/test_open2.mobi

47.6 KB
Binary file not shown.

tests/resources/test_open2.pdf

342 KB
Binary file not shown.

tests/resources/test_open2.svg

Lines changed: 18 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)