Test changes to use -b where necessary.

This commit is contained in:
clanmills 2020-05-12 10:59:00 +01:00
parent 7515d85a09
commit 3f4eccd43c
19 changed files with 50 additions and 53 deletions

View File

@ -69,7 +69,7 @@ fi
grep x-default l.xmp
copyTestFile $IMG l.jpg
runTest exiv2 -iX l.jpg
runTest exiv2 -px l.jpg
runTest exiv2 -px -b l.jpg
runTest exiv2 -PEkycv l.jpg
runTest exiv2 -pi l.jpg

View File

@ -8,7 +8,7 @@ class TestCvePoC(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/54"
filename = "$data_path/POC7"
commands = ["$exiv2 $filename"]
commands = ["$exiv2 -b $filename"]
stdout = [
"""File name : $filename
File size : 632 Bytes

View File

@ -15,7 +15,7 @@ Error: Offset of directory Image, entry 0x0117 is out of bounds: Offset = 0x3030
filename = "$data_path/cve_2017_18005_reproducer.tiff"
commands = [
"$exiv2 -vPEIXxgklnycsvth " + filename,
"$exiv2 -vPEIXxgklnycsvth -b " + filename,
"$exiv2json " + filename
]

View File

@ -7,21 +7,21 @@ class test_issue_1046Test(metaclass=CaseMeta):
filename = path("$data_path/IMG_0246_copy.exv")
# Use the """ string syntax for -M"set Bla.Dee.Bla" commands to ensure they run on Windows!
commands = [ "$exiv2 -pt -g GPSInfo -g UserCom $filename"
, "$exiv2 -pv -g GPSInfo -g UserCom $filename"
commands = [ "$exiv2 -pt -b -g GPSInfo -g UserCom $filename"
, "$exiv2 -pv -b -g GPSInfo -g UserCom $filename"
,"""$exiv2 -M"set Exif.Photo.UserComment charset=Ascii how now brown cow" $filename"""
, "$exiv2 -pt -g UserComment $filename"
, "$exiv2 -pv -g UserComment $filename"
, "$exiv2 -pt -b -g UserComment $filename"
, "$exiv2 -pv -b -g UserComment $filename"
,"""$exiv2 -M"set Exif.Photo.UserComment charset=Unicode \u0041\u0042" $filename"""
, "$exiv2 -pt -g UserComment $filename"
, "$exiv2 -pv -g UserComment $filename"
, "$exiv2 -pt -b -g UserComment $filename"
, "$exiv2 -pv -b -g UserComment $filename"
,"""$exiv2 -M"set Exif.Photo.UserComment hello world" $filename"""
, "$exiv2 -pt -g UserComment $filename"
, "$exiv2 -pv -g UserComment $filename"
, "$exiv2 -pt -b -g UserComment $filename"
, "$exiv2 -pv -b -g UserComment $filename"
,"""$exiv2 -M"set Exif.GPSInfo.GPSProcessingMethod charset=Unicode \u0052\u006f\u0062\u0069\u006e" $filename"""
,"""$exiv2 -M"set Exif.GPSInfo.GPSAreaInformation charset=Ascii area information" $filename"""
, "$exiv2 -pt -g GPSPro -g GPSArea $filename"
, "$exiv2 -pv -g GPSPro -g GPSArea $filename"
, "$exiv2 -pt -b -g GPSPro -g GPSArea $filename"
, "$exiv2 -pv -b -g GPSPro -g GPSArea $filename"
]
stdout = ["""Exif.Photo.UserComment Undefined 12 charset=Unicode AB
Exif.GPSInfo.GPSVersionID Byte 4 2.2.0.0

View File

@ -10,7 +10,7 @@ class TestFirstPoC(metaclass=system_tests.CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/247"
filename = "$data_path/2-invalid-memory-access"
commands = ["$exiv2 -pt " + filename]
commands = ["$exiv2 -pt -b " + filename]
stdout = [
"""Exif.Image.Make Ascii 6 Canon
Exif.Image.Orientation Short 1 top, left

View File

@ -14,7 +14,7 @@ class OutOfMemoryInPsdImageReadMetadata(metaclass=CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/855"
filename = path("$data_path/issue_855_poc.psd")
commands = ["$exiv2 $filename"]
commands = ["$exiv2 -b $filename"]
stdout = [""]
stderr = ["""Warning: Failed to decode IPTC metadata.
Exiv2 exception in print action for file $filename:

View File

@ -8,12 +8,12 @@ class CanonAfInfoTest(metaclass=CaseMeta):
filenameB = path("$data_path/test_issue_981b.exv")
filenameC = path("$data_path/test_issue_981c.exv")
filenameD = path("$data_path/test_issue_981d.exv")
commands = ["$exiv2 -pa --grep Canon.AF $filenameA",
"$exiv2 -pa --grep Canon.AF $filenameB",
"$exiv2 -pv --grep Points $filenameC",
"$exiv2 -pt --grep Points $filenameC",
"$exiv2 -pv --grep Unusable $filenameD",
"$exiv2 -pt --grep Unusable $filenameD",
commands = ["$exiv2 -pa -b --grep Canon.AF $filenameA",
"$exiv2 -pa -b --grep Canon.AF $filenameB",
"$exiv2 -pv -b --grep Points $filenameC",
"$exiv2 -pt -b --grep Points $filenameC",
"$exiv2 -pv -b --grep Unusable $filenameD",
"$exiv2 -pt -b --grep Unusable $filenameD",
]
stdout = ["""Exif.Canon.AFInfo Short 48 96 2 9 9 4752 3168 4272 2848 115 115 115 162 200 162 115 115 115 153 153 153 105 199 105 153 153 153 64409 64862 64862 0 0 0 674 674 1127 0 321 65215 603 0 64933 321 65215 0 16 256 0 65535

View File

@ -5,7 +5,7 @@ import system_tests
class ShadowingError(metaclass=system_tests.CaseMeta):
commands = ["$exiv2 -PE $data_path/IMGP0020.exv"]
commands = ["$exiv2 -PE -b $data_path/IMGP0020.exv"]
stdout = [""]
stderr = [""]
retval = [0]

View File

@ -8,7 +8,7 @@ class IPTCtimeWithoutTimeZone(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/440"
filename = "$data_path/exiv2-bug440.jpg"
commands = ["$exiv2 -u -pi $filename"]
commands = ["$exiv2 -u -b -pi $filename"]
stdout = ["""Iptc.Application2.RecordVersion Short 1 1
Iptc.Application2.ObjectName String 16 WHITE SOX TIGERS
Iptc.Application2.Category String 1 S

View File

@ -15,13 +15,13 @@ class CheckPentaxK10(metaclass=system_tests.CaseMeta):
"$data_path/exiv2-bug1144g.exv",
]
commands = [ "$exiv2 -pa -g Lens " + filenames[0],
"$exiv2 -pa -g Lens " + filenames[1],
"$exiv2 -pa -g Lens " + filenames[2],
"$exiv2 -pa -g Lens " + filenames[3],
"$exiv2 -pa -g Lens " + filenames[4],
"$exiv2 -pa -g Lens " + filenames[5],
"$exiv2 -pa -g Lens " + filenames[6],
commands = [ "$exiv2 -pa -b -g Lens " + filenames[0],
"$exiv2 -pa -b -g Lens " + filenames[1],
"$exiv2 -pa -b -g Lens " + filenames[2],
"$exiv2 -pa -b -g Lens " + filenames[3],
"$exiv2 -pa -b -g Lens " + filenames[4],
"$exiv2 -pa -b -g Lens " + filenames[5],
"$exiv2 -pa -b -g Lens " + filenames[6],
]
stdout = [ """Exif.PentaxDng.LensType Byte 3 Sigma AF 10-20mm F4-5.6 EX DC

View File

@ -17,15 +17,15 @@ class CheckPentaxK3(metaclass=system_tests.CaseMeta):
"$data_path/exiv2-bug1155i.exv",
]
commands = [ "$exiv2 -pa -g Lens " + filenames[0],
"$exiv2 -pa -g Lens " + filenames[1],
"$exiv2 -pa -g Lens " + filenames[2],
"$exiv2 -pa -g Lens " + filenames[3],
"$exiv2 -pa -g Lens " + filenames[4],
"$exiv2 -pa -g Lens " + filenames[5],
"$exiv2 -pa -g Lens " + filenames[6],
"$exiv2 -pa -g Lens " + filenames[7],
"$exiv2 -pa -g Lens " + filenames[8],
commands = [ "$exiv2 -pa -b -g Lens " + filenames[0],
"$exiv2 -pa -b -g Lens " + filenames[1],
"$exiv2 -pa -b -g Lens " + filenames[2],
"$exiv2 -pa -b -g Lens " + filenames[3],
"$exiv2 -pa -b -g Lens " + filenames[4],
"$exiv2 -pa -b -g Lens " + filenames[5],
"$exiv2 -pa -b -g Lens " + filenames[6],
"$exiv2 -pa -b -g Lens " + filenames[7],
"$exiv2 -pa -b -g Lens " + filenames[8],
]
stdout = [ """Exif.PentaxDng.LensType Byte 4 Sigma 70-300mm F4-5.6 Macro

View File

@ -8,7 +8,7 @@ class CheckShutterInPentax(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/1242"
filename = "$data_path/Reagan.jp2"
commands = ["$exiv2 -pa $filename"]
commands = ["$exiv2 -pa -b $filename"]
stdout = [r"""Exif.Image.ImageDescription Ascii 403 040621-N-6536T-062
USS Ronald Reagan (CVN 76), June 21, 2004 - USS Ronald Reagan (CVN 76) sails through the Straits of Magellan on its way to the Pacific Ocean. The Navyís newest aircraft carrier is underway circumnavigating South America in transit to its new homeport of San Diego. U.S. Navy photo by Photographerís Mate 3rd Class (AW) Elizabeth Thompson. (RELEASE)

View File

@ -9,7 +9,7 @@ class CrashAfterLightzoneEdit(metaclass=system_tests.CaseMeta):
filename = "$data_path/exiv2-bug479.jpg"
commands = ["$exiv2 -u -pt $filename"]
commands = ["$exiv2 -u -b -pt $filename"]
stdout = ["""Exif.Image.ImageWidth Short 1 3173
Exif.Image.ImageLength Short 1 2011

View File

@ -11,7 +11,7 @@ class TypeSizeForExifOnly(metaclass=system_tests.CaseMeta):
filename = "$data_path/exiv2-bug528_copy.jpg"
commands = [
"$exiv2 -u -pt $filename",
"$exiv2 -u -b -pt $filename",
"""$exiv2 -u -v -M"set Exif.Image.Software GI" $filename"""
]

View File

@ -7,16 +7,13 @@ 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 -PEkyct $filename",
"$exiv2 -u -v -b -PEkyct $filename",
"""$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Non-intrusive update" $filename""",
"$exiv2 -u -v -PEkyct $filename",
"$exiv2 -u -v -b -PEkyct $filename",
"""$exiv2 -u -v -M"set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch" $filename""",
"$exiv2 -u -v -PEkyct $filename",
"$exiv2 -u -v -b -PEkyct $filename",
]
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class LittleEndianORFFilesFromE_PL1Corrupted(metaclass=system_tests.CaseMeta):

View File

@ -12,7 +12,7 @@ FORMATS = ["jpg", "psd"]
def make_commands(filename):
return [
"""$exiv2 -u -v -M"set Exif.Photo.UserComment Test" """ + filename,
"$exiv2 -u -pt " + filename
"$exiv2 -u -pt -b " + filename
]

View File

@ -13,7 +13,7 @@ class DetectionOfSigma55_200mmLens(metaclass=system_tests.CaseMeta):
]
commands = [
"$exiv2 -pa --grep Lens " + filename for filename in filenames
"$exiv2 -pa -b --grep Lens " + filename for filename in filenames
]
stdout = [
"""Exif.Pentax.LensType Byte 2 Sigma 55-200mm F4-5.6 DC

View File

@ -9,7 +9,7 @@ class DontSegfaultWhenAccessingFocalLength(metaclass=CaseMeta):
filename = path("$data_path/exiv2-bug855.jpg")
commands = ["$exiv2 -pa $filename"]
commands = ["$exiv2 -pa -b $filename"]
stdout = ["""Exif.Image.NewSubfileType Long 1 Thumbnail/Preview image
Exif.Image.Make Ascii 20 PENTAX

View File

@ -11,8 +11,8 @@ class DarwinCoreXmpMetadataPrint(metaclass=CaseMeta):
filename = path("$data_path/exiv2-bug937.jpg")
commands = [
"$exiv2 -q -pa -g dwc $filename",
"$exiv2 -q -PXkyctl -g Date $filename",
"$exiv2 -q -pa -b -g dwc $filename",
"$exiv2 -q -PXkyctl -b -g Date $filename",
]
stdout = [