diff --git a/tests/resources/README.rst b/tests/resources/README.rst index d3675fa4..735d7cf3 100644 --- a/tests/resources/README.rst +++ b/tests/resources/README.rst @@ -20,10 +20,10 @@ In some cases they were converted from one image format to another without other +---------------------+--------------------------------------------------------------------------------+ | lichtenstein.pdf | `Wikimedia: JPEG2000 Lichtenstein`_ (Creative Commons BY-SA 3.0) | +---------------------+--------------------------------------------------------------------------------+ -| LinnSequencer.jpg, | `Wikimedia: LinnSequencer`_ (Creative Commons Attribution-ShareAlike 3.0) | +| LinnSequencer.jpg, | `Wikimedia: LinnSequencer`_ (Creative Commons BY-SA 3.0) | | linn.pdf, linn.txt | | +---------------------+--------------------------------------------------------------------------------+ - + Files generated for this project ================================ @@ -38,6 +38,7 @@ under the terms of the license in LICENSE.rst. - francais.pdf (a page containing French accented characters) - hugemono.pdf (large monochrome JBIG2 page with pixel dimensions of 35000x35000) - invalid.pdf (a PDF file header followed by EOF marker) +- masks.pdf (a file containing explicit masks and stencil masks; printout of `"Linux" (German Wikipedia article)`_ (Creative Commons Attribution-ShareAlike) scanned on a HP Officejet 8620 scanner, contributed by Github user @supergrobi) - missing_docinfo.pdf (PDF file with no /DocumentInfo section) @@ -66,3 +67,5 @@ These test resources are assemblies from other previously mentioned files, relea .. _`Wikimedia: Pandas text analysis.png`: https://en.wikipedia.org/wiki/File:Pandas_text_analysis.png .. _`Wikimedia: JPEG2000 Lichtenstein`: https://en.wikipedia.org/wiki/JPEG_2000#/media/File:Jpeg2000_2-level_wavelet_transform-lichtenstein.png + +.. _`Linux (Wikipedia Article)`: https://de.wikipedia.org/wiki/Linux \ No newline at end of file diff --git a/tests/resources/masks.pdf b/tests/resources/masks.pdf new file mode 100755 index 00000000..dd2706b5 Binary files /dev/null and b/tests/resources/masks.pdf differ diff --git a/tests/test_main.py b/tests/test_main.py index 8d58da9c..d4144a3c 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -626,3 +626,7 @@ def test_stdin(spoof_tesseract_noop): assert p2.returncode == ExitCode.ok + +def test_masks(spoof_tesseract_noop): + check_ocrmypdf('masks.pdf', 'test_masks.pdf', env=spoof_tesseract_noop) +