Skip to content

Commit

Permalink
tests/: added a test that we don't segv when treating .epub doc as a …
Browse files Browse the repository at this point in the history
…pdf.

This is #3615.
  • Loading branch information
julian-smith-artifex-com committed Jun 25, 2024
1 parent c542b26 commit 35e7e0f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Binary file added tests/resources/test_3615.epub
Binary file not shown.
11 changes: 11 additions & 0 deletions tests/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -1235,3 +1235,14 @@ def test_scientific_numbers():
assert b" 1e-" not in contents
else:
assert b" 1e-" in contents

def test_3615():
print('')
print(f'{pymupdf.pymupdf_version=}', flush=1)
print(f'{pymupdf.VersionBind=}', flush=1)
path = os.path.normpath(f'{__file__}/../../tests/resources/test_3615.epub')
doc = pymupdf.open(path)
print(doc.pagemode)
print(doc.pagelayout)
wt = pymupdf.TOOLS.mupdf_warnings()
assert wt

0 comments on commit 35e7e0f

Please sign in to comment.