Add a test case to check on the @argumentsfile syntax

This commit is contained in:
James R. Barlow
2015-08-05 23:17:38 -07:00
parent 2744dafb74
commit 97015ef775
2 changed files with 15 additions and 2 deletions
+7 -2
View File
@@ -89,11 +89,16 @@ Compatibility notes
ocrmypdf input.pdf output.pdf @settings.txt
where ``settings.txt`` contains, for example:
where ``settings.txt`` contains *one argument per line*, for example:
::
-l deu --author 'A. Merkel' --pdf-renderer tesseract
-l
deu
--author
A. Merkel
--pdf-renderer
tesseract
Fixes
+8
View File
@@ -162,6 +162,14 @@ def test_skip_ocr():
check_ocrmypdf('graph_ocred.pdf', 'test_skip.pdf', '-s')
def test_argsfile():
with open(_make_output('test_argsfile.txt'), 'w') as argsfile:
print('--title', 'ArgsFile Test', '--author', 'Test Cases',
sep='\n', end='\n', file=argsfile)
check_ocrmypdf('graph.pdf', 'test_argsfile.pdf',
'@' + _make_output('test_argsfile.txt'))
def check_ocr_timeout(renderer):
out = check_ocrmypdf('skew.pdf', 'test_timeout_%s.pdf' % renderer,
'--tesseract-timeout', '1.0')