Skip to content

Commit

Permalink
Add remaining pocs for the issue 428 and adapt the regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
piponazo committed Sep 11, 2018
1 parent 8b480bc commit cfc7a1c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
Binary file added test/data/issue_428_poc5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/data/issue_428_poc6.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/data/issue_428_poc7.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/data/issue_428_poc8.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 16 additions & 6 deletions tests/bugfixes/github/test_issue_428.py
Expand Up @@ -2,6 +2,10 @@

import system_tests

def stderr_exception (fname):
return """$exiv2_exception_message """ + fname + """:
$kerFailedToReadImageData
"""

class PngReadRawProfile(metaclass=system_tests.CaseMeta):

Expand All @@ -12,14 +16,20 @@ class PngReadRawProfile(metaclass=system_tests.CaseMeta):
system_tests.path("$data_path/issue_428_poc2.png"),
system_tests.path("$data_path/issue_428_poc3.png"),
system_tests.path("$data_path/issue_428_poc4.png"),
system_tests.path("$data_path/issue_428_poc5.png"),
system_tests.path("$data_path/issue_428_poc8.png"),

system_tests.path("$data_path/issue_428_poc6.png"),
system_tests.path("$data_path/issue_428_poc7.png"),
]

commands = ["$exiv2 " + fname for fname in filenames]
stdout = [""] * len(filenames)
stderr = [
"""$exiv2_exception_message """ + fname + """:
$kerFailedToReadImageData
"""
for fname in filenames
]
stderr = [ stderr_exception(fname) for fname in filenames[0:6] ]
stderr.append("""Error: XMP Toolkit error 201: XML parsing failure
Warning: Failed to decode XMP metadata.
""" + stderr_exception(filenames[6]))
stderr.append("""Warning: Failed to decode Exif metadata.
""" + stderr_exception(filenames[7]))

retval = [1] * len(filenames)

0 comments on commit cfc7a1c

Please sign in to comment.