Check for encrypted PDF and complain appropriately

This commit is contained in:
James R. Barlow
2015-12-17 10:37:54 -08:00
parent 9622e31da9
commit 102bd07019
3 changed files with 11 additions and 1 deletions
Binary file not shown.
+6
View File
@@ -317,3 +317,9 @@ def test_qpdf_repair_fails():
print(out)
print(err)
assert p.returncode == ExitCode.input_file
def test_encrypted():
p, out, err = run_ocrmypdf_env('skew-encrypted.pdf', 'wont_be_created.pdf')
assert p.returncode == ExitCode.input_file
assert out.find('password')