# -*- coding: utf-8 -*-
import system_tests
import os.path
@system_tests.DeleteFiles("$xmpname")
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class AdobeXmpNamespace(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/751"
filename = os.path.join("$data_path", "exiv2-empty_copy.jpg")
xmpname = os.path.join("$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