diff --git a/tests/resources/test_3687-3.epub b/tests/resources/test_3687-3.epub new file mode 100644 index 000000000..76581a229 Binary files /dev/null and b/tests/resources/test_3687-3.epub differ diff --git a/tests/resources/test_3687.epub b/tests/resources/test_3687.epub new file mode 100644 index 000000000..b510dd58d Binary files /dev/null and b/tests/resources/test_3687.epub differ diff --git a/tests/test_textextract.py b/tests/test_textextract.py index 2a8a25e49..ef30ca77e 100644 --- a/tests/test_textextract.py +++ b/tests/test_textextract.py @@ -329,3 +329,17 @@ def test_3594(): # We expect MuPDF warnings. wt = pymupdf.TOOLS.mupdf_warnings() assert wt + + +def test_3687(): + path1 = pymupdf.open(os.path.normpath(f'{__file__}/../../tests/resources/test_3687.epub')) + path2 = pymupdf.open(os.path.normpath(f'{__file__}/../../tests/resources/test_3687-3.epub')) + for path in path1, path2: + print(f'Looking at {path=}.') + with pymupdf.open(path) as document: + page = document[0] + text = page.get_text("text") + print(f'{text=!s}') + wt = pymupdf.TOOLS.mupdf_warnings() + print(f'{wt=}') + assert wt == 'unknown epub version: 3.0'