diff --git a/test/data/issue_1954_poc.xmp b/test/data/issue_1954_poc.xmp new file mode 100644 index 00000000..dbd46190 --- /dev/null +++ b/test/data/issue_1954_poc.xmp @@ -0,0 +1 @@ +-9223372036854775807-3 \ No newline at end of file diff --git a/tests/bugfixes/github/test_issue_1954.py b/tests/bugfixes/github/test_issue_1954.py new file mode 100644 index 00000000..53b76f59 --- /dev/null +++ b/tests/bugfixes/github/test_issue_1954.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +from system_tests import CaseMeta, path + +class XMPUtilsLeapYearOverflow(metaclass=CaseMeta): + """ + Regression test for the bug described in: + https://github.com/Exiv2/exiv2/issues/1954 + """ + url = "https://github.com/Exiv2/exiv2/issues/1954" + + filename = path("$data_path/issue_1954_poc.xmp") + commands = ["$exiv2 -q $filename"] + stderr = ["""$filename: No Exif data found in the file +"""] + stdout = ["""File name : $filename +File size : 172 Bytes +MIME type : application/rdf+xml +Image size : 0 x 0 +"""] + retval = [253]