exiv2/tests/bugfixes/redmine/test_issue_1112.py
Luis Diaz Mas 145f8fc456 Port redmine issues from the bash test suite to the python one.
* Port redmine issue 1024
 * Port redmine issue 1026
 * Port redmine issue 1040
 * Port redmine issue 1044
 * Port redmine issue 1053
 * Port redmine issue 1054 (not finished yet; I found some issues there)
 * Port redmine issue 1058
 * Port redmine issue 1062
 * Port redmine issue 1080
 * Port redmine issue 1108
 * Port redmine issue 1112
 * Port redmine issue 1114
 * Port redmine issue 1122
 * Port redmine issue 1140
 * Port redmine issue 1144
 * Port redmine issue 1145
 * Port redmine issue 1153
 * Port redmine issue 1155
 * Port redmine issue 1166
 * Port redmine issue 1167
 * Port redmine issue 1170
 * Replace escaped chars in 1054
 * Add brackets in exiv2json::main()
 * Link all sample apps against exiv2lib
 * Changes in 1054
 * test 1054: fix dates depending on Local time
 * Do not run make with VERBOSE=1
 * Use system_tests.path
 * Fix windows issues with quotes
 * Use system_tests.path
 * Use itertools to simplify test code
2018-07-31 18:18:14 +02:00

30 lines
965 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-bug1112.xmp")
class CheckXmpTimeZoneInformation(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/1112"
filename = system_tests.path("$data_path/exiv2-bug1112_copy.xmp")
commands = [ """$exiv2 -M "del Xmp.dc.title" $filename""" ]
stdout = [ "" ]
stderr = [""]
retval = [0]
xmp_packet = """<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmp:CreateDate="2012-02-01T16:28:00+02:00"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>"""
def post_tests_hook(self):
with open(self.filename, "r", encoding='utf-8') as xmp_file:
self.assertMultiLineEqual(self.xmp_packet, xmp_file.read(-1))