exiv2/tests/bugfixes/github/test_pr_1999.py
Jim Easterbrook 2e2dd887e3 Use \" instead of ' for exiv2 command string
The original failed on some Windows test runs.
2021-12-01 10:17:25 +00:00

29 lines
829 B
Python

# -*- coding: utf-8 -*-
import system_tests
from system_tests import CaseMeta, path
class TestXmpDateTimeSetting(metaclass=CaseMeta):
"""
Test fix for issue 1998.
"""
infile = path("$data_path/issue_1998.xmp")
commands = [
"$exiv2 -M\"set Xmp.xmp.CreateDate XmpText 2021-02-03T12:00:00+01:00\" $infile",
"$exiv2 -K Xmp.xmp.CreateDate $infile",
"$exiv2 -M\"set Xmp.xmp.CreateDate XmpText 2021-02-03T12:34:56+02:00\" $infile",
"$exiv2 -K Xmp.xmp.CreateDate $infile",
]
stdout = [
"",
"""Xmp.xmp.CreateDate XmpText 25 2021-02-03T12:00:00+01:00
""",
"",
"""Xmp.xmp.CreateDate XmpText 25 2021-02-03T12:34:56+02:00
""",
]
stderr = [""]*4
retval = [0]*4