exiv2/tests/bugfixes/github/test_issue_428.py
Luis Díaz Más b9f9d041ea Several transformations on DataBuf + migration to size_t
- Provide begin/end iterators to DataBuf and simplify code
- Adapt test output after last changes
- Replacing long by size_t in value.hpp
- Use size_t in some Photoshop functions
- Remove some static_casts
2022-02-27 09:41:47 +01:00

39 lines
1.2 KiB
Python

# -*- coding: utf-8 -*-
import system_tests
def stderr_exception (fname):
return """$exiv2_exception_message """ + fname + """:
$kerFailedToReadImageData
"""
class PngReadRawProfile(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/428"
filenames = [
system_tests.path("$data_path/issue_428_poc1.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_poc7.png"),
system_tests.path("$data_path/issue_428_poc2.png"),
system_tests.path("$data_path/issue_428_poc6.png"),
]
commands = ["$exiv2 " + fname for fname in filenames]
stdout = [""] * len(filenames)
stderr = [ stderr_exception(fname) for fname in filenames[0:6] ]
stderr.append("""$exiv2_exception_message """ + filenames[6] + """:
$kerInputDataReadFailed
""")
stderr.append("""Error: XMP Toolkit error 201: Error in XMLValidator
Warning: Failed to decode XMP metadata.
""" + stderr_exception(filenames[7]))
retval = [1] * len(filenames)