From 50fc40bb7c1a7caa6c585b3ee36ccee435e52667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Fri, 11 Feb 2022 10:11:16 +0100 Subject: [PATCH] Add system test to reproduce issue with special characters --- tests/bash_tests/test_issue_1996.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/bash_tests/test_issue_1996.py diff --git a/tests/bash_tests/test_issue_1996.py b/tests/bash_tests/test_issue_1996.py new file mode 100644 index 00000000..e401ead9 --- /dev/null +++ b/tests/bash_tests/test_issue_1996.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +import shutil +import system_tests +import os + +@system_tests.CopyTmpFiles("$data_path/Stonehenge.heic") +class Exiv2FilePathsWithSpecialCharacters(metaclass=system_tests.CaseMeta): + url = "https://github.com/Exiv2/exiv2/issues/1996" + + # Rename temporary file so that the path contains special Greek characters + original_file = system_tests.path("$tmp_path/Stonehenge.heic") + dst_file = system_tests.path("$tmp_path/Εκκρεμότητες.heic") + + def setUp(self): + shutil.copyfile(self.original_file, self.dst_file) + + def tearDown(self): + os.remove(self.original_file) + os.remove(self.dst_file) + + commands = ["$exiv2 -K Xmp.cm2e.Father $dst_file"] + stdout = ["Xmp.cm2e.Father XmpText 11 Robin Mills\n"] + stderr = [""] + retval = [0]