diff --git a/.travis.yml b/.travis.yml index eff3a563..82e46b1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,6 +43,7 @@ install: script: - mv ocrmypdf dont_import_this_ocrmypdf +- tesseract --version - pytest -n auto - mv dont_import_this_ocrmypdf ocrmypdf diff --git a/docs/release_notes.rst b/docs/release_notes.rst index 97f1fd8d..a6241f98 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -6,10 +6,10 @@ OCRmyPDF uses `semantic versioning `_ for its command line i The OCRmyPDF package itself does not contain a public API, although it is fairly stable and breaking changes are usually timed with a major release. A future release will clearly define the stable public API. -next ----- +v5.3.3 +------ -- Fix missing error message that should occur when trying to force ``--pdf-renderer sandwich`` on old versions of Tesseract +- Fixed missing error message that should occur when trying to force ``--pdf-renderer sandwich`` on old versions of Tesseract - Update copyright information in test files - Set system ``LANG`` to UTF-8 in Dockerfiles to avoid UTF-8 encoding errors diff --git a/tests/spoof/tesseract_big_image_error.py b/tests/spoof/tesseract_big_image_error.py index 63cbe6e4..d4aeae3d 100755 --- a/tests/spoof/tesseract_big_image_error.py +++ b/tests/spoof/tesseract_big_image_error.py @@ -4,9 +4,9 @@ import sys -VERSION_STRING = '''tesseract 3.04.00 - leptonica-1.72 - libjpeg 8d : libpng 1.6.19 : libtiff 4.0.6 : zlib 1.2.5 +VERSION_STRING = '''tesseract 3.05.01 + leptonica-1.74.4 + libjpeg 9b : libpng 1.6.32 : libtiff 4.0.8 : zlib 1.2.8 SPOOFED: return error claiming image too big ''' @@ -20,10 +20,10 @@ def main(): print(VERSION_STRING, file=sys.stderr) sys.exit(0) elif sys.argv[1] == '--list-langs': - print('List of available languages (1):\neng', file=sys.stderr) + print('List of available languages (1):\neng\n', file=sys.stderr) sys.exit(0) elif sys.argv[1] == '--print-parameters': - print('A parameter list would go here', file=sys.stderr) + print('A parameter list would go here\ntextonly_pdf 0\n', file=sys.stderr) sys.exit(0) elif sys.argv[-2] == 'hocr': print("Image too large: (33830, 14959)\n" diff --git a/tests/spoof/tesseract_crash.py b/tests/spoof/tesseract_crash.py index 42b4550c..bf3d71ae 100755 --- a/tests/spoof/tesseract_crash.py +++ b/tests/spoof/tesseract_crash.py @@ -5,9 +5,9 @@ import os import signal -VERSION_STRING = '''tesseract 3.04.00 - leptonica-1.72 - libjpeg 8d : libpng 1.6.19 : libtiff 4.0.6 : zlib 1.2.5 +VERSION_STRING = '''tesseract 3.05.01 + leptonica-1.74.4 + libjpeg 9b : libpng 1.6.32 : libtiff 4.0.8 : zlib 1.2.8 SPOOFED: CRASH ON OCR or -psm 0 ''' @@ -30,7 +30,8 @@ def main(): print('List of available languages (1):\neng', file=sys.stderr) sys.exit(0) elif sys.argv[1] == '--print-parameters': - print('List of parameters would go here', file=sys.stderr) + print('A parameter list would go here\ntextonly_pdf 0\n', + file=sys.stderr) sys.exit(0) elif sys.argv[-2] == 'hocr': print("KABOOM! Tesseract failed for some reason", file=sys.stderr)