exiv2/tests/bugfixes/github/test_issue_1713.py
Kevin Backhouse a4c5bdac19 fix: stricter date parsing in value.cpp (#1720)
* Regression test for issue 1713

* Stricter date parsing.

* Fix test failure caused by stdout mismatch.

(cherry picked from commit ab58026cff0e5edebc026261e9dc4b7db05b802d)
2021-06-27 10:21:38 +02:00

27 lines
741 B
Python

# -*- coding: utf-8 -*-
from system_tests import CaseMeta, path
class InvalidDateXMP(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/issues/1713
"""
url = "https://github.com/Exiv2/exiv2/issues/1713"
filename = path("$data_path/issue_1713_poc.xmp")
commands = ["$exiv2 -Ph $filename"]
stderr = [
"""Warning: Failed to convert Xmp.xmp.CreateDate to Exif.Photo.DateTimeDigitized (Day is out of range)
Exiv2 exception in print action for file $filename:
Xmpdatum::copy: Not supported
"""
]
retval = [1]
def compare_stdout(self, i, command, got_stdout, expected_stdout):
""" We don't care about the stdout, just don't crash """
pass