Fix issues with python strings & literals
This commit is contained in:
parent
90c8d754b7
commit
72faa7331d
@ -9,7 +9,7 @@ class EasyaccessTest(metaclass=system_tests.CaseMeta):
|
||||
filename = "$data_path/exiv2-empty_copy.jpg"
|
||||
|
||||
commands = [
|
||||
"$exiv2 -u -v -M\"set Exif.Image.Make Samsung\" $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.Image.Make Samsung" $filename""",
|
||||
"$easyaccess_test $filename"
|
||||
]
|
||||
stdout = [
|
||||
|
||||
@ -13,9 +13,9 @@ class SetCommentOnImageWithEmptyComment(metaclass=system_tests.CaseMeta):
|
||||
empty_jpg = "$data_path/exiv2-empty_copy.jpg"
|
||||
|
||||
commands = [
|
||||
"$exiv2 -u -v -M'set Exif.Photo.UserComment A comment' $bug_repr",
|
||||
"""$exiv2 -u -v -M"set Exif.Photo.UserComment A comment" $bug_repr""",
|
||||
"$exiv2 -u -b -pt $bug_repr",
|
||||
"$exiv2 -u -v -M'set Exif.Photo.UserComment A comment' $empty_jpg",
|
||||
"""$exiv2 -u -v -M"set Exif.Photo.UserComment A comment" $empty_jpg""",
|
||||
"$exiv2 -u -b -pt $empty_jpg"
|
||||
]
|
||||
|
||||
|
||||
@ -10,9 +10,9 @@ class NonIntrusiveWriteUpdateIFD(metaclass=system_tests.CaseMeta):
|
||||
|
||||
filename = "$data_path/exiv2-empty_copy.jpg"
|
||||
commands = [
|
||||
"$exiv2 -u -v -M\"set Exif.GPSInfo.GPSLatitude SRational -1/3 -2/3 -3/3\" $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude SRational -1/3 -2/3 -3/3" $filename""",
|
||||
"$exiv2 -u -pv $filename",
|
||||
"$exiv2 -u -v -M\"set Exif.GPSInfo.GPSLatitude Rational 1/3 2/3 3/3\" $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude Rational 1/3 2/3 3/3" $filename""",
|
||||
"$exiv2 -u -pv $filename",
|
||||
|
||||
]
|
||||
|
||||
@ -11,9 +11,9 @@ class ReadDataAfterTagDelete(metaclass=system_tests.CaseMeta):
|
||||
filename = "$data_path/exiv2-empty_copy.jpg"
|
||||
|
||||
commands = [
|
||||
"$exiv2 -u -v -M\"set Exif.GPSInfo.GPSLatitude 0/1 1/1 2/1\" $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude 0/1 1/1 2/1" $filename""",
|
||||
"$exiv2 -u -v -pv $filename",
|
||||
"$exiv2 -u -v -M\"del Exif.GPSInfo.GPSLatitude\" $filename",
|
||||
"""$exiv2 -u -v -M"del Exif.GPSInfo.GPSLatitude" $filename""",
|
||||
"$exiv2 -u -v -pv $filename"
|
||||
]
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ class TypeSizeForExifOnly(metaclass=system_tests.CaseMeta):
|
||||
|
||||
commands = [
|
||||
"$exiv2 -u -pt $filename",
|
||||
"$exiv2 -u -v -M\"set Exif.Image.Software GI\" $filename"
|
||||
"""$exiv2 -u -v -M"set Exif.Image.Software GI" $filename"""
|
||||
]
|
||||
|
||||
stdout = ["""Exif.Image.ProcessingSoftware Ascii 20 digiKam-0.9.4-beta4
|
||||
|
||||
@ -11,7 +11,7 @@ class SettingExifImageDateTimeDateGivesValueTooLarge(
|
||||
|
||||
filename = "$data_path/exiv2-empty_copy.jpg"
|
||||
commands = [
|
||||
"$exiv2 -u -v -M\"set Exif.Image.DateTime Date 2007-05-27\" $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.Image.DateTime Date 2007-05-27" $filename""",
|
||||
"$exiv2 -u -pt $filename"
|
||||
]
|
||||
stdout = [
|
||||
|
||||
@ -10,29 +10,31 @@ class UnicodeEncodingOfExifUserCommentTag(metaclass=system_tests.CaseMeta):
|
||||
|
||||
filename = "$data_path/exiv2-empty_copy.jpg"
|
||||
commands = [
|
||||
"$exiv2 -u -M\"set Exif.Photo.UserComment charset=Ascii An ascii comment\" $filename",
|
||||
"$exiv2 -u -M'set Exif.Photo.UserComment charset=Ascii An ascii comment' $filename",
|
||||
"$exiv2 -u -PEnh $filename",
|
||||
|
||||
"$exiv2 -u -M\"set Exif.Photo.UserComment charset=Ascii A\\\\nnewline\" $filename",
|
||||
"""$exiv2 -u -M'set Exif.Photo.UserComment charset=Ascii A
|
||||
newline' $filename""",
|
||||
"$exiv2 -u -PEnh $filename",
|
||||
|
||||
"$exiv2 -u -M\"set Exif.Photo.UserComment charset=Unicode A Unicode comment\" $filename",
|
||||
"$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode A Unicode comment' $filename",
|
||||
"$exiv2 -u -PEnh $filename",
|
||||
|
||||
"$exiv2 -u -M\"set Exif.Photo.UserComment charset=Unicode \\\\u01c4\" $filename",
|
||||
"$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode \u01c4' $filename",
|
||||
"$exiv2 -u -PEnh $filename",
|
||||
|
||||
"$exiv2 -u -M\"set Exif.Photo.UserComment charset=Unicode A\\\\u01c4C\" $filename",
|
||||
"$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode A\u01c4C' $filename",
|
||||
"$exiv2 -u -PEnh $filename",
|
||||
|
||||
"$exiv2 -u -M\"set Exif.Photo.UserComment charset=Unicode With\\\\nNewline\" $filename",
|
||||
"""$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode With
|
||||
Newline' $filename""",
|
||||
"$exiv2 -u -PEnh $filename",
|
||||
|
||||
"$exiv2 -u -M\"set Exif.Photo.UserComment charset=Unicode With\\\\tTab\" $filename",
|
||||
"$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode With\tTab' $filename",
|
||||
"$exiv2 -u -PEnh $filename",
|
||||
|
||||
#Test invalid escape sequences
|
||||
"$exiv2 -u -M\"set Exif.Photo.UserComment charset=Unicode \\\\ugggg\" $filename",
|
||||
"$exiv2 -u -M'set Exif.Photo.UserComment charset=Unicode \\\\ugggg' $filename",
|
||||
"$exiv2 -u -PEnh $filename",
|
||||
]
|
||||
stdout = [
|
||||
|
||||
@ -10,13 +10,7 @@ class OptimizeBinaryArrayElements(metaclass=system_tests.CaseMeta):
|
||||
|
||||
filename = "$data_path/exiv2-empty_copy.jpg"
|
||||
commands = [
|
||||
"$exiv2 -u -v -M'set Exif.Image.Make NIKON' "
|
||||
"-M'set Exif.Image.Model D90' "
|
||||
"-M'set Exif.Nikon3.ShutterCount 100' "
|
||||
"-M'set Exif.Nikon3.SerialNumber 123' "
|
||||
"-M'set Exif.NikonSi02xx.Version 48 50 51 52' "
|
||||
"-M'set Exif.NikonSi02xx.ShutterCount 100' $filename",
|
||||
|
||||
"""$exiv2 -u -v -M"set Exif.Image.Make NIKON" -M"set Exif.Image.Model D90" -M"set Exif.Nikon3.ShutterCount 100" -M"set Exif.Nikon3.SerialNumber 123" -M"set Exif.NikonSi02xx.Version 48 50 51 52" -M"set Exif.NikonSi02xx.ShutterCount 100" $filename""",
|
||||
"$exiv2 -u -pa -u -b $filename"
|
||||
]
|
||||
stdout = [
|
||||
|
||||
@ -6,14 +6,12 @@ import system_tests
|
||||
URL = "http://dev.exiv2.org/issues/711"
|
||||
|
||||
COMMANDS = [
|
||||
"$exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Initial values, read from the command line' "
|
||||
"-M'set Exif.Image.DocumentName Float 0.12345' "
|
||||
"-M'set Exif.Image.ImageDescription Double 0.987654321' $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Initial values, read from the command line" -M"set Exif.Image.DocumentName Float 0.12345" -M"set Exif.Image.ImageDescription Double 0.987654321" $filename""",
|
||||
|
||||
"$exiv2 -u -v -PEkyct $filename",
|
||||
"$exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Non-intrusive update' $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Non-intrusive update" $filename""",
|
||||
"$exiv2 -u -v -PEkyct $filename",
|
||||
"$exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch' $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch" $filename""",
|
||||
"$exiv2 -u -v -PEkyct $filename",
|
||||
]
|
||||
|
||||
|
||||
@ -13,10 +13,10 @@ class AdobeXmpNamespace(metaclass=system_tests.CaseMeta):
|
||||
xmpname = "$data_path/exiv2-empty_copy.xmp"
|
||||
|
||||
commands = [
|
||||
"$exiv2 -v -M'reg imageapp orig/' -M 'set Xmp.imageapp.uuid abcd' $filename",
|
||||
"""$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 -v -M"reg imageapp dest/" -M "set Xmp.imageapp.uuid abcd" $filename""",
|
||||
"$exiv2 -f -eX $filename",
|
||||
"$cat $xmpname",
|
||||
]
|
||||
|
||||
@ -11,7 +11,7 @@ class AssertionSvEqualsDFailedRegression(metaclass=system_tests.CaseMeta):
|
||||
filename = "$data_path/exiv2-empty_copy.jpg"
|
||||
|
||||
commands = [
|
||||
"$exiv2 -u -v -M\"add Exif.Image.Make Canon\" -M\"add Exif.CanonCs.0x0001 Short 1\" -M\"add Exif.CanonCs.0x0000 Short 2\" $filename",
|
||||
"""$exiv2 -u -v -M"add Exif.Image.Make Canon" -M"add Exif.CanonCs.0x0001 Short 1" -M"add Exif.CanonCs.0x0000 Short 2" $filename""",
|
||||
"$exiv2 -u -v -PEkyct $filename"
|
||||
]
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ class WritingXmpLrHierarchicalSubjectWritesWrongDatatype(
|
||||
|
||||
commands = [
|
||||
"$exiv2 -px $filename",
|
||||
"$exiv2 -M\"add Xmp.lr.hierarchicalSubject root|1st|2nd|3rd|4th|5th\" $filename",
|
||||
"""$exiv2 -M"add Xmp.lr.hierarchicalSubject root|1st|2nd|3rd|4th|5th" $filename""",
|
||||
"$exiv2 -px $filename",
|
||||
]
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ FORMATS = ["jpg", "psd"]
|
||||
|
||||
def make_commands(filename):
|
||||
return [
|
||||
"$exiv2 -u -v -M'set Exif.Photo.UserComment Test' " + filename,
|
||||
"""$exiv2 -u -v -M"set Exif.Photo.UserComment Test" """ + filename,
|
||||
"$exiv2 -u -pt " + filename
|
||||
]
|
||||
|
||||
|
||||
@ -30,9 +30,9 @@ class DoNotDestroyHardLinks(metaclass=system_tests.CaseMeta):
|
||||
file_list = "{!s} {!s} {!s}".format(filename, link_1, link_2)
|
||||
|
||||
commands = [
|
||||
"$exiv2 -u -v -M\"set Exif.Photo.UserComment Test Bug $num\" $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.Photo.UserComment Test Bug $num" $filename""",
|
||||
"$exiv2 -PE -g UserComment $file_list",
|
||||
"$exiv2 -u -v -M\"set Exif.Photo.UserComment Test Bug $num modified\" $filename",
|
||||
"""$exiv2 -u -v -M"set Exif.Photo.UserComment Test Bug $num modified" $filename""",
|
||||
"$exiv2 -PE -g UserComment $file_list"
|
||||
]
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user