# -*- coding: utf-8 -*-
from system_tests import DeleteFiles, CopyFiles, CaseMeta, path
@DeleteFiles("$xmpname")
@CopyFiles("$data_path/exiv2-empty.jpg")
class AdobeXmpNamespace(metaclass=CaseMeta):
url = "http://dev.exiv2.org/issues/751"
filename = path("$data_path/exiv2-empty_copy.jpg")
xmpname = path("$data_path/exiv2-empty_copy.xmp")
commands = [
"""$exiv2 -v -M"reg imageapp orig/" -M "set Xmp.imageapp.uuid abcd" $filename""",
"$exiv2 -f -eX $filename",
"$cat $xmpname",
"""$exiv2 -v -M"reg imageapp dest/" -M "set Xmp.imageapp.uuid abcd" $filename""",
"$exiv2 -f -eX $filename",
"$cat $xmpname",
]
stdout = [
"""File 1/1: $filename
Reg imageapp="orig/"
Set Xmp.imageapp.uuid "abcd" (XmpText)
""",
"",
"""
""",
"""File 1/1: $filename
Reg imageapp="dest/"
Set Xmp.imageapp.uuid "abcd" (XmpText)
""",
"",
"""
"""
]
stderr = [
"",
"",
"",
"""Warning: Updating namespace URI for imageapp from orig/ to dest/
""",
"""Warning: Updating namespace URI for imageapp from dest/ to orig/
""",
""
]
retval = [0] * 6