diff --git a/tests/test_cli.py b/tests/test_cli.py index b663f23..3177b3e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,5 +1,7 @@ from __future__ import annotations +import os +import shutil import tempfile import pytest @@ -68,3 +70,18 @@ class TestCliConversion(TestCliBasic): def test_lang_eng(self): result = self.run_cli(f'"{self.sample_doc}" --ocr-lang eng') assert result.exit_code == 0 + + @pytest.mark.parametrize( + "filename,", + [ + "“Curly_Quotes”.pdf", # issue 144 + "Оригинал.pdf", + ], + ) + def test_filenames(self, filename): + tempdir = tempfile.mkdtemp(prefix="dangerzone-") + doc_path = os.path.join(filename) + shutil.copyfile(self.sample_doc, doc_path) + result = self.run_cli(doc_path) + shutil.rmtree(tempdir) + assert result.exit_code == 0