Skip to content

Commit

Permalink
Regression test for Exiv2#1901
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinbackhouse committed Sep 12, 2021
1 parent 1b53899 commit 4f12680
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/data/issue_1901_poc.xmp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<x:xmpmeta xmlns:x=" "><rdf:RDF xmlns:rdf=" "><rdf:Description xmlns:xmp="a"><xmp:CreateDate>-9223372034707290000</xmp:CreateDate></rdf:Description></rdf:RDF></x:xmpmeta>
42 changes: 42 additions & 0 deletions tests/bugfixes/github/test_issue_1901.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# -*- coding: utf-8 -*-

from system_tests import CaseMeta, path

class XMPUtilsSetTimeZoneIntegerOverflow(metaclass=CaseMeta):
"""
Regression test for the bug described in:
https://github.com/Exiv2/exiv2/issues/1901
"""
url = "https://github.com/Exiv2/exiv2/issues/1901"

filename = path("$data_path/issue_1901_poc.xmp")
commands = ["$exiv2 $filename"]
stderr = ["""Warning: Unsupported date format
"""]
stdout = ["""File name : $filename
File size : 170 Bytes
MIME type : application/rdf+xml
Image size : 0 x 0
Thumbnail : None
Camera make :
Camera model :
Image timestamp :
File number :
Exposure time :
Aperture :
Exposure bias :
Flash :
Flash bias :
Focal length :
Subject distance:
ISO speed :
Exposure mode :
Metering mode :
Macro mode :
Image quality :
White balance :
Copyright :
Exif comment :
"""]
retval = [0]

0 comments on commit 4f12680

Please sign in to comment.