Merge pull request #287 from Exiv2/port_redmine_issues

Port redmine issues 426-825 to the new test suite
This commit is contained in:
D4N
2018-05-24 12:37:09 +02:00
committed by GitHub
34 changed files with 1745 additions and 9 deletions
+2 -1
View File
@@ -43,7 +43,8 @@ build_script:
- cmd: unit_tests.exe
- cmd: cd ../../tests/
- cmd: set EXIV2_EXT=.exe
- cmd: c:\Python36\python.exe runner.py
- cmd: set EXIV2_CAT=type
- cmd: c:\Python36\python.exe runner.py -v
cache:
- envs # Conan installation
-3
View File
@@ -21,6 +21,3 @@ make tests
make install
cd bin
./unit_tests
cd ../../tests/
python3 runner.py
+2 -2
View File
@@ -20,8 +20,8 @@ Error: Directory Pentax, entry 0x3030 has invalid size 808464432*1; skipping ent
url = "http://dev.exiv2.org/issues/1305"
filename = "$data_path/IMGP0006-min.jpg"
commands = ["$exiv2 " + filename]
stdout = ["""File name : """ + filename + """
commands = ["$exiv2 $filename"]
stdout = ["""File name : $filename
File size : 12341 Bytes
MIME type : image/jpeg
Image size : 0 x 0
+21
View File
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
import system_tests
class ReadIPTfromJPEG(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/426"
filename = "$data_path/exiv2-bug426.jpg"
commands = ["$exiv2 -u -pi $filename"]
stdout = ["""Iptc.Application2.RecordVersion Short 1 2
Iptc.Application2.FixtureId String 22 2005 Oregon Coast Tour
Iptc.Application2.Byline String 14 Julie V. Early
Iptc.Application2.City String 21 159 km SW of Portland
Iptc.Application2.ProvinceState String 6 Oregon
Iptc.Application2.CountryName String 13 United States
Iptc.Application2.Contact String 16 Jeffrey J. Early
"""]
stderr = [""]
retval = [0]
+31
View File
@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*-
import system_tests
class IPTCtimeWithoutTimeZone(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/440"
filename = "$data_path/exiv2-bug440.jpg"
commands = ["$exiv2 -u -pi $filename"]
stdout = ["""Iptc.Application2.RecordVersion Short 1 1
Iptc.Application2.ObjectName String 16 WHITE SOX TIGERS
Iptc.Application2.Category String 1 S
Iptc.Application2.SuppCategory String 3 BBA
Iptc.Application2.DateCreated Date 8 2005-09-29
Iptc.Application2.TimeCreated Time 11 16:51:00+00:00
Iptc.Application2.Byline String 11 PAUL SANCYA
Iptc.Application2.BylineTitle String 3 STF
Iptc.Application2.City String 7 DETROIT
Iptc.Application2.ProvinceState String 2 MI
Iptc.Application2.CountryName String 3 USA
Iptc.Application2.TransmissionReference String 6 DTS112
Iptc.Application2.Headline String 14 GARCIA GARLAND
Iptc.Application2.Credit String 2 AP
Iptc.Application2.Source String 2 AP
Iptc.Application2.Caption String 282 Chicago White Sox pitcher John Garland, left, pours champagne on Freddy Garcia in the locker room after their 4-2 win against the Detroit Tigers in Detroit, Thursday, Sept. 29, 2005. With the win the White Sox clinched their first AL Central title since 2000. (AP Photo/Paul Sancya)
Iptc.Application2.Writer String 15 DD PCS DD**NY**
"""]
stderr = [""]
retval = [0]
+44
View File
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class EasyaccessTest(metaclass=system_tests.CaseMeta):
filename = "$data_path/exiv2-empty_copy.jpg"
commands = [
"""$exiv2 -u -v -M"set Exif.Image.Make Samsung" $filename""",
"$easyaccess_test $filename"
]
stdout = [
"""File 1/1: $filename
Set Exif.Image.Make "Samsung" (Ascii)
""",
"""Orientation ( ) :
ISO speed ( ) :
Flash bias ( ) :
Exposure mode ( ) :
Scene mode ( ) :
Macro mode ( ) :
Image quality ( ) :
White balance ( ) :
Lens name ( ) :
Saturation ( ) :
Sharpness ( ) :
Contrast ( ) :
Scene capture type ( ) :
Metering mode ( ) :
Camera make (Exif.Image.Make ) : Samsung
Camera model ( ) :
Exposure time ( ) :
FNumber ( ) :
Subject distance ( ) :
Camera serial number ( ) :
Focal length ( ) :
AF point ( ) :
"""
]
stderr = [""] * 2
retval = [0] * 2
+58
View File
@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
import system_tests
class CorruptedIopDir(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/443"
filename = "$data_path/exiv2-bug443.jpg"
commands = ["$exiv2 -u -b -pt $filename"]
stdout = ["""Exif.Image.Make Ascii 22 EASTMAN KODAK COMPANY
Exif.Image.Model Ascii 28 KODAK DX3600 DIGITAL CAMERA
Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 170
Exif.Image.YResolution Rational 1 170
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.DateTime Ascii 20 2003:07:27 13:08:24
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.ExifTag Long 1 208
Exif.Photo.ExposureTime Rational 1 0.002 s
Exif.Photo.FNumber Rational 1 F3.4
Exif.Photo.ExposureProgram Short 1 Auto
Exif.Photo.ExifVersion Undefined 4 2.00
Exif.Photo.DateTimeOriginal Ascii 20 2003:07:27 16:22:28
Exif.Photo.DateTimeDigitized Ascii 20 2003:07:27 16:22:28
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.ShutterSpeedValue SRational 1 1/512 s
Exif.Photo.ApertureValue Rational 1 F3.4
Exif.Photo.ExposureBiasValue SRational 1 0 EV
Exif.Photo.MaxApertureValue Rational 1 F3.2
Exif.Photo.SubjectDistance Rational 1 1.10 m
Exif.Photo.MeteringMode Short 1 Average
Exif.Photo.LightSource Short 1 Unknown
Exif.Photo.Flash Short 1 No flash
Exif.Photo.FocalLength Rational 1 5.6 mm
Exif.Photo.MakerNote Undefined 872 75 68 75 48 48 48 49 73 68 88 51 54 48 48 32 32 3 1 0 0 8 7 176 4 211 7 7 27 16 22 28 37 0 0 0 0 0 0 75 1 173 0 0 0 0 0 0 3 89 49 0 0 89 49 0 0 176 48 0 0 218 48 0 0 0 2 0 0 110 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 96 126 1 0 0 0 1 0 128 52 1 0 0 0 0 0 100 0 100 0 0 0 32 0 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 166 165 166 173 138 113 169 170 194 108 58 12 167 171 177 186 101 73 84 106 181 163 83 20 171 170 177 179 43 26 52 81 172 195 86 26 167 171 173 175 76 12 52 165 165 104 69 76 113 106 85 141 11 16 48 141 125 116 114 103 19 22 72 69 8 65 125 107 110 104 104 96 22 53 76 31 32 100 120 85 95 94 91 89 66 76 69 43 45 81 57 85 85 77 75 74 193 181 193 189 157 124 186 200 219 130 91 15 198 189 192 210 104 100 104 131 196 180 108 42 190 191 189 187 55 34 65 84 197 209 113 73 188 197 190 203 70 18 58 187 199 123 86 107 147 113 121 148 11 26 65 162 145 137 136 137 32 32 109 59 9 96 119 126 129 126 132 125 35 83 97 34 38 142 143 100 110 119 116 121 83 101 97 44 56 94 76 108 108 104 103 102 0 0 0 0 0 0 0 0 96 126 1 0 0 0 1 0 128 52 1 0 195 132 1 0 0 0 1 0 184 44 1 0 0 0 0 0 0 0 0 0 0 0 0 0 96 126 1 0 0 0 1 0 128 52 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 96 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 147 0 25 26 0 0 82 124 254 255 0 0 141 0 0 0 0 0 0 0 0 0 0 176 77 0 0 0 0 0 0 0 0 0 192 7 0 0 0 0 0 0 128 0 0 0 192 17 0 0 96 4 0 0 0 0 0 0 51 179 0 0 124 3 0 0 0 0 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 244 50 0 0 6 0 0 0 72 250 164 1 230 253 129 255 221 0 16 0 177 3 79 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0 176 48 1 0 0 0 2 1 0 0 27 24 0 0 175 1 0 0 232 0 0 0 0 0 0 0 55 0 0 0 218 48 0 0 0 0 0 0 0 0 0 0 100 0 89 49 1 0 0 0 2 0 0 0 200 6 0 0 175 1 0 0 134 0 0 0 81 2 0 0 55 0 0 0 89 49 0 0 0 0 0 0 0 0 0 0 9 61 129 37 0 0 0 0 60 1 0 0 0 0 0 0 1 0 1 0 29 0 33 0 0 0 100 20 40 255 29 47 195 49 227 48 38 49 51 48 0 0 0 0 0 0 0 0 0 0 16 16 15 15 15 0 0 0 0 0 0 0 0 0 10 10 10 10 100 10 10 10 100 100 100 10 10 100 100 0 0 0 0 0 0 100 0 0 0 0 0 0 10 10 10 10 100 10 10 10 100 100 100 10 29 100 100 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 118 1 0 176 163 255 255 80 230 255 255 160 224 255 255 144 113 1 0 208 173 255 255 224 6 0 0 64 146 255 255 224 102 1 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.Photo.UserComment Undefined 1
Exif.Photo.FlashpixVersion Undefined 4 1.01
Exif.Photo.ColorSpace Short 1 sRGB
Exif.Photo.PixelXDimension Long 1 1024
Exif.Photo.PixelYDimension Long 1 683
Exif.Photo.InteroperabilityTag Long 1 1850
Exif.Photo.ExposureIndex Rational 1 1677721600/16777216
Exif.Photo.SensingMethod Short 1 One-chip color area
Exif.Photo.FileSource Undefined 1 Digital still camera
Exif.Photo.SceneType Undefined 1 Directly photographed
Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.Orientation Short 1 top, left
Exif.Thumbnail.XResolution Rational 1 72
Exif.Thumbnail.YResolution Rational 1 72
Exif.Thumbnail.ResolutionUnit Short 1 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 1628
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 33779
"""]
stderr = ["""Error: Directory Iop with 5233 entries considered invalid; not read.
"""]
retval = [0]
+22
View File
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
import system_tests
class PanicOnMisinformedIPTC(metaclass=system_tests.CaseMeta):
encodings = ['latin-1']
url = "http://dev.exiv2.org/issues/444"
filename = "$data_path/exiv2-bug444.jpg"
commands = ["$exiv2 -u -pi $filename"]
stdout = ["""Iptc.Envelope.CharacterSet String 4 \x00Ä\x1c\x02
Iptc.Application2.Urgency String 2 GT
Iptc.Application2.SuppCategory String 8 portrait
Iptc.Application2.Caption String 18 Witty caption here
Iptc.Application2.Keywords String 3 ize
Iptc.Application2.0x007b String 4 n123
"""]
stderr = [""]
retval = [0]
+162
View File
@@ -0,0 +1,162 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-bug445.jpg",
"$data_path/exiv2-empty.jpg")
class SetCommentOnImageWithEmptyComment(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/445"
bug_repr = "$data_path/exiv2-bug445_copy.jpg"
empty_jpg = "$data_path/exiv2-empty_copy.jpg"
commands = [
"""$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 -b -pt $empty_jpg"
]
stdout = [
"""File 1/1: $bug_repr
Set Exif.Photo.UserComment "A comment" (Comment)
""",
"""Exif.Image.Make Ascii 6 Canon
Exif.Image.Model Ascii 20 Canon PowerShot S40
Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 180
Exif.Image.YResolution Rational 1 180
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.DateTime Ascii 20 2003:12:14 12:01:44
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.ExifTag Long 1 196
Exif.Photo.ExposureTime Rational 1 1/500 s
Exif.Photo.FNumber Rational 1 F4.9
Exif.Photo.ExifVersion Undefined 4 2.20
Exif.Photo.DateTimeOriginal Ascii 20 2003:12:14 12:01:44
Exif.Photo.DateTimeDigitized Ascii 20 2003:12:14 12:01:44
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.CompressedBitsPerPixel Rational 1 5
Exif.Photo.ShutterSpeedValue SRational 1 1/501 s
Exif.Photo.ApertureValue Rational 1 F5
Exif.Photo.ExposureBiasValue SRational 1 0 EV
Exif.Photo.MaxApertureValue Rational 1 F2.8
Exif.Photo.MeteringMode Short 1 Center weighted average
Exif.Photo.Flash Short 1 No, auto
Exif.Photo.FocalLength Rational 1 21.3 mm
Exif.Photo.MakerNote Undefined 450 12 0 1 0 3 0 40 0 0 0 68 4 0 0 2 0 3 0 4 0 0 0 148 4 0 0 3 0 3 0 4 0 0 0 156 4 0 0 4 0 3 0 27 0 0 0 164 4 0 0 0 0 3 0 6 0 0 0 218 4 0 0 0 0 3 0 4 0 0 0 230 4 0 0 6 0 2 0 32 0 0 0 238 4 0 0 7 0 2 0 24 0 0 0 14 5 0 0 8 0 4 0 1 0 0 0 59 225 17 0 9 0 2 0 32 0 0 0 38 5 0 0 16 0 4 0 1 0 0 0 0 0 17 1 13 0 3 0 21 0 0 0 70 5 0 0 0 0 0 0 80 0 2 0 0 0 5 0 1 0 0 0 0 0 4 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 17 0 5 0 1 0 3 48 1 0 255 255 255 255 170 2 227 0 32 0 149 0 192 0 0 0 0 0 0 0 0 0 0 0 0 0 255 255 49 0 224 8 224 8 0 0 1 0 2 0 170 2 30 1 215 0 0 0 0 0 0 0 0 0 54 0 0 0 160 0 20 1 149 0 31 1 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 2 48 0 0 0 0 0 0 1 0 14 3 0 0 149 0 33 1 0 0 0 0 0 0 250 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 73 77 71 58 80 111 119 101 114 83 104 111 116 32 83 52 48 32 74 80 69 71 0 0 0 0 0 0 0 0 0 0 70 105 114 109 119 97 114 101 32 86 101 114 115 105 111 110 32 49 46 49 48 0 0 0 65 110 100 114 101 97 115 32 72 117 103 103 101 108 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 42 0 3 0 1 128 122 1 1 128 0 0 0 0 0 0 3 1 2 0 0 0 10 0 0 0 0 0 0 0 57 0 198 0 5 0 0 0 0 0 0 0
Exif.MakerNote.Offset Long 1 942
Exif.MakerNote.ByteOrder Ascii 3 II
Exif.CanonCs.0x0000 Short 1 80
Exif.CanonCs.Macro Short 1 Off
Exif.CanonCs.Selftimer Short 1 Off
Exif.CanonCs.Quality Short 1 Superfine
Exif.CanonCs.FlashMode Short 1 Auto
Exif.CanonCs.DriveMode Short 1 Single / timer
Exif.CanonCs.0x0006 Short 1 0
Exif.CanonCs.FocusMode Short 1 Single
Exif.CanonCs.0x0008 Short 1 0
Exif.CanonCs.0x0009 Short 1 1
Exif.CanonCs.ImageSize Short 1 Large
Exif.CanonCs.EasyMode Short 1 Manual
Exif.CanonCs.DigitalZoom Short 1 None
Exif.CanonCs.Contrast Short 1 Normal
Exif.CanonCs.Saturation Short 1 Normal
Exif.CanonCs.Sharpness Short 1 Normal
Exif.CanonCs.ISOSpeed Short 1 100
Exif.CanonCs.MeteringMode Short 1 Center-weighted average
Exif.CanonCs.FocusType Short 1 Auto
Exif.CanonCs.AFPoint Short 1 Center
Exif.CanonCs.ExposureProgram Short 1 Program (P)
Exif.CanonCs.0x0015 Short 1 65535
Exif.CanonCs.LensType Short 1 n/a
Exif.CanonCs.Lens Short 3 7.1 - 21.3 mm
Exif.CanonCs.MaxAperture Short 1 F5
Exif.CanonCs.MinAperture Short 1 F8
Exif.CanonCs.FlashActivity Short 1 Did not fire
Exif.CanonCs.FlashDetails Short 1
Exif.CanonCs.0x001e Short 1 0
Exif.CanonCs.0x001f Short 1 0
Exif.CanonCs.FocusContinuous Short 1 Single
Exif.CanonCs.AESetting Short 1 Normal AE
Exif.CanonCs.ImageStabilization Short 1 (65535)
Exif.CanonCs.DisplayAperture Short 1 49
Exif.CanonCs.ZoomSourceWidth Short 1 2272
Exif.CanonCs.ZoomTargetWidth Short 1 2272
Exif.CanonCs.0x0026 Short 1 0
Exif.CanonCs.SpotMeteringMode Short 1 AF Point
Exif.Canon.FocalLength Short 4 21.3 mm
Exif.Canon.0x0003 Short 4 0 0 0 0
Exif.CanonSi.0x0000 Short 1 54
Exif.CanonSi.0x0001 Short 1 0
Exif.CanonSi.ISOSpeed Short 1 100
Exif.CanonSi.MeasuredEV Short 1 13.63
Exif.CanonSi.TargetAperture Short 1 F5
Exif.CanonSi.TargetShutterSpeed Short 1 1/501 s
Exif.CanonSi.0x0006 Short 1 0
Exif.CanonSi.WhiteBalance Short 1 Auto
Exif.CanonSi.0x0008 Short 1 0
Exif.CanonSi.Sequence Short 1 0
Exif.CanonSi.0x000a Short 1 6
Exif.CanonSi.0x000b Short 1 0
Exif.CanonSi.0x000c Short 1 0
Exif.CanonSi.0x000d Short 1 0
Exif.CanonSi.AFPointUsed Short 1 3 focus points; center used
Exif.CanonSi.FlashBias Short 1 0 EV
Exif.CanonSi.0x0010 Short 1 0
Exif.CanonSi.0x0011 Short 1 0
Exif.CanonSi.0x0012 Short 1 1
Exif.CanonSi.SubjectDistance Short 1 7.82 m
Exif.CanonSi.0x0014 Short 1 0
Exif.CanonSi.ApertureValue Short 1 F5
Exif.CanonSi.ShutterSpeedValue Short 1 1/523 s
Exif.CanonSi.MeasuredEV2 Short 1 -6.00
Exif.CanonSi.0x0018 Short 1 0
Exif.CanonSi.0x0019 Short 1 0
Exif.CanonSi.0x001a Short 1 250
Exif.Canon.0x0000 Short 6 0 0 0 0 0 0
Exif.Canon.0x0000 Short 4 0 0 0 0
Exif.Canon.ImageType Ascii 32 IMG:PowerShot S40 JPEG
Exif.Canon.FirmwareVersion Ascii 24 Firmware Version 1.10
Exif.Canon.FileNumber Long 1 117-1771
Exif.Canon.OwnerName Ascii 32 Andreas Huggel
Exif.Canon.ModelID Long 1 PowerShot S40
Exif.Canon.CameraInfo Short 21 42 3 32769 378 32769 0 0 0 259 2 0 10 0 0 0 57 198 5 0 0 0
Exif.Photo.UserComment Undefined 17 A comment
Exif.Photo.FlashpixVersion Undefined 4 1.00
Exif.Photo.ColorSpace Short 1 sRGB
Exif.Photo.PixelXDimension Short 1 2272
Exif.Photo.PixelYDimension Short 1 1704
Exif.Photo.InteroperabilityTag Long 1 1416
Exif.Iop.InteroperabilityIndex Ascii 4 R98
Exif.Iop.InteroperabilityVersion Undefined 4 1.00
Exif.Iop.RelatedImageWidth Short 1 2272
Exif.Iop.RelatedImageLength Short 1 1704
Exif.Photo.FocalPlaneXResolution Rational 1 8114.29
Exif.Photo.FocalPlaneYResolution Rational 1 8114.29
Exif.Photo.FocalPlaneResolutionUnit Short 1 inch
Exif.Photo.SensingMethod Short 1 One-chip color area
Exif.Photo.FileSource Undefined 1 Digital still camera
Exif.Photo.CustomRendered Short 1 Normal process
Exif.Photo.ExposureMode Short 1 Auto
Exif.Photo.WhiteBalance Short 1 Auto
Exif.Photo.DigitalZoomRatio Rational 1 1.0
Exif.Photo.SceneCaptureType Short 1 Standard
Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.XResolution Rational 1 180
Exif.Thumbnail.YResolution Rational 1 180
Exif.Thumbnail.ResolutionUnit Short 1 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 2036
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 5448
""",
"""File 1/1: $empty_jpg
Set Exif.Photo.UserComment "A comment" (Comment)
""",
"""Exif.Image.ExifTag Long 1 26
Exif.Photo.UserComment Undefined 17 A comment
"""
]
stderr = [""] * 4
retval = [0] * 4
+23
View File
@@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
import system_tests
class BufferOverflowInSscanf(metaclass=system_tests.CaseMeta):
"""
This requires some sort of memchecker, either valgrind or ASAN.
"""
url = "http://dev.exiv2.org/issues/447"
filename = "$data_path/exiv2-bug447.jpg"
commands = ["$exiv2 -u -pi $filename"]
stdout = ["""Iptc.Application2.Caption String 0
Iptc.Application2.DateCreated Date 8 2005-08-09
Iptc.Application2.TimeCreated Time 11 01:28:31-07:00
"""]
stderr = ["""Error: Directory NikonPreview with 8224 entries considered invalid; not read.
Warning: Directory Photo, entry 0x9286 has unknown Exif (TIFF) type 14; setting type size 1.
"""]
retval = [0]
+33
View File
@@ -0,0 +1,33 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class NonIntrusiveWriteUpdateIFD(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/452"
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 -pv $filename",
"""$exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude Rational 1/3 2/3 3/3" $filename""",
"$exiv2 -u -pv $filename",
]
stdout = [
"""File 1/1: $filename
Set Exif.GPSInfo.GPSLatitude "-1/3 -2/3 -3/3" (SRational)
""",
"""0x8825 Image GPSTag Long 1 26
0x0002 GPSInfo GPSLatitude SRational 3 -1/3 -2/3 -3/3
""",
"""File 1/1: $filename
Set Exif.GPSInfo.GPSLatitude "1/3 2/3 3/3" (Rational)
""",
"""0x8825 Image GPSTag Long 1 26
0x0002 GPSInfo GPSLatitude Rational 3 1/3 2/3 3/3
"""]
stderr = [""] * 4
retval = [0] * 4
+21
View File
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
import system_tests
class EncodingTest(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/460"
filename = "$data_path/exiv2-bug460.jpg"
commands = ["$exiv2 -u -pt $filename"]
stdout = ["""Exif.Image.XPTitle Byte 40 Titel und ähnliches
Exif.Image.XPComment Byte 46 And a standard comment
Exif.Image.XPAuthor Byte 44 Українська (Russian?)
Exif.Image.XPKeywords Byte 30 עברית (Hebrew)
Exif.Image.XPSubject Byte 32 తెలుగు (Telugu)
"""]
stderr = [""]
retval = [0]
+40
View File
@@ -0,0 +1,40 @@
# -*- coding: utf-8 -*-
import system_tests
class CrashAfterLightzoneEdit(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/479"
filename = "$data_path/exiv2-bug479.jpg"
commands = ["$exiv2 -u -pt $filename"]
stdout = ["""Exif.Image.ImageWidth Short 1 3173
Exif.Image.ImageLength Short 1 2011
Exif.Image.Software Ascii 10 LightZone
Exif.Image.HostComputer Ascii 20 Linux 2.6.15-23-686
Exif.Image.ExposureTime Rational 1 3.2 s
Exif.Image.FNumber Rational 1 F9
Exif.Image.ExifTag Long 1 784
Exif.Photo.ExifVersion Undefined 4 2.20
Exif.Photo.PixelXDimension Short 1 3173
Exif.Photo.PixelYDimension Short 1 2011
Exif.Image.ExposureProgram Short 1 Manual
Exif.Image.ISOSpeedRatings Short 1 250
Exif.Image.0x9000 Undefined 4 48 50 50 49
Exif.Image.DateTimeOriginal Ascii 20 2006:05:27 12:37:03
Exif.Image.0x9004 Ascii 20 2006:05:27 12:37:03
Exif.Image.0x9101 Undefined 4 0 0 0 0
Exif.Image.ShutterSpeedValue SRational 1 3 s
Exif.Image.ApertureValue Rational 1 F9
Exif.Image.ExposureBiasValue SRational 1 0 EV
Exif.Image.MeteringMode Short 1 Multi-segment
Exif.Image.Flash Short 1 No, compulsory
Exif.Image.FocalLength Rational 1 24.0 mm
Exif.Image.0x9286 Undefined 264 (Binary value suppressed)
"""]
stderr = ["""Error: Directory Image: Next pointer is out of bounds; ignored.
"""]
retval = [0]
+24
View File
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-bug480.jpg")
class LargeIptcTest(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/480"
bug_file = "$data_path/exiv2-bug480_copy.jpg"
imagemagick_file = "$data_path/imagemagick.png"
commands = ["$largeiptc_test $bug_file $imagemagick_file"]
stdout = ["""Reading 144766 bytes from $imagemagick_file
IPTC fields: 0
IPTC fields: 144775
IRB buffer : 144788
Comparing IPTC and IRB size... ok
Comparing IPTC and IRB data... ok
"""]
stderr = [""]
retval = [0]
+21
View File
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
import system_tests
class CorruptedIopDirectory(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/495"
filename = "$data_path/exiv2-bug495.jpg"
commands = ["$exiv2 -u -pi $filename"]
stdout = ["""Iptc.Application2.Caption String 56 Die Insel Stromboli mit dem Vulkan Stromboli, 1000m hoch
Iptc.Application2.Program String 7 digiKam
Iptc.Application2.ProgramVersion String 11 0.9.0-beta3
"""]
stderr = [""]
retval = [0]
compare_stderr = system_tests.check_no_ASAN_UBSAN_errors
+37
View File
@@ -0,0 +1,37 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class ReadDataAfterTagDelete(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/498"
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 -pv $filename",
"""$exiv2 -u -v -M"del Exif.GPSInfo.GPSLatitude" $filename""",
"$exiv2 -u -v -pv $filename"
]
stdout = [
"""File 1/1: $filename
Set Exif.GPSInfo.GPSLatitude "0/1 1/1 2/1" (Rational)
""",
"""File 1/1: $filename
0x8825 Image GPSTag Long 1 26
0x0002 GPSInfo GPSLatitude Rational 3 0/1 1/1 2/1
""",
"""File 1/1: $filename
Del Exif.GPSInfo.GPSLatitude
""",
"""File 1/1: $filename
"""
]
stderr = [""] * 3 + ["""$filename: No Exif data found in the file
"""]
retval = [0] * 4
+43
View File
@@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
import system_tests
class IptcFieldParsingTooStrict(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/501"
filename = "$data_path/exiv2-bug501.jpg"
commands = ["$exiv2 -u -pi $filename"]
encodings = ['windows-1252']
stdout = ["""Iptc.Application2.RecordVersion Short 1 2
Iptc.Application2.Caption String 15 Porträtt på Eva
Iptc.Application2.Writer String 10 Elsa Nordh
Iptc.Application2.Byline String 10 Elsa Nordh
Iptc.Application2.ObjectName String 7 Hundbus
Iptc.Application2.DateCreated Date 8 2006-10-31
Iptc.Application2.City String 8 Göteborg
Iptc.Application2.ProvinceState String 15 Västra Götaland
Iptc.Application2.CountryName String 6 Sweden
Iptc.Application2.Keywords String 3 Eva
Iptc.Application2.Keywords String 7 Gallery
Iptc.Application2.Keywords String 21 Framkalla jul06 mamma
Iptc.Application2.Copyright String 19 http://nordharna.se
Iptc.Application2.ExpirationTime String 2 SE
Iptc.Application2.SubLocation String 9 KÃ¥lltorp
Iptc.Application2.0x00d1 String 9 Göteborg
Iptc.Application2.0x00d2 String 17 Västra Götaland
Iptc.Application2.0x00d3 String 6 416 81
Iptc.Application2.0x00d4 String 6 Sweden
Iptc.Application2.0x00d5 String 19 +46-(0)736-21 50 74
Iptc.Application2.0x00d6 String 17 foto@nordharna.se
Iptc.Application2.0x00d7 String 27 http://gallery.nordharna.se
Iptc.Application2.0x00e3 String 27 http://gallery.nordharna.se
Iptc.Application2.0x00f2 String 1 4
"""]
stderr = ["""Warning: Unsupported time format
"""]
retval = [0]
+95
View File
@@ -0,0 +1,95 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-bug528.jpg")
class TypeSizeForExifOnly(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/528"
filename = "$data_path/exiv2-bug528_copy.jpg"
commands = [
"$exiv2 -u -pt $filename",
"""$exiv2 -u -v -M"set Exif.Image.Software GI" $filename"""
]
stdout = ["""Exif.Image.ProcessingSoftware Ascii 20 digiKam-0.9.4-beta4
Exif.Image.ImageWidth Long 1 2888
Exif.Image.ImageLength Long 1 1700
Exif.Image.DocumentName Ascii 13 Chambord.jpg
Exif.Image.Make Ascii 6 Canon
Exif.Image.Model Ascii 14 Canon EOS 40D
Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 72
Exif.Image.YResolution Rational 1 72
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.Software Ascii 11 GIMP 2.4.5
Exif.Image.DateTime Ascii 20 2008:04:14 08:24:04
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.Rating SLong 1 3
Exif.Image.RatingPercent SLong 1 50
Exif.Image.ExifTag Long 1 318
Exif.Photo.ExposureTime Rational 1 1/250 s
Exif.Photo.FNumber Rational 1 F11
Exif.Photo.ExposureProgram Short 1 Auto
Exif.Photo.ISOSpeedRatings Short 1 400
Exif.Photo.ExifVersion Undefined 4 2.21
Exif.Photo.DateTimeOriginal Ascii 20 2008:04:01 13:40:03
Exif.Photo.DateTimeDigitized Ascii 20 2008:04:01 13:40:03
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.ShutterSpeedValue SRational 1 1/256 s
Exif.Photo.ApertureValue Rational 1 F11
Exif.Photo.ExposureBiasValue SRational 1 +1/3 EV
Exif.Photo.MeteringMode Short 1 Multi-segment
Exif.Photo.Flash Short 1 No, compulsory
Exif.Photo.FocalLength Rational 1 10.0 mm
Exif.Photo.MakerNote Undefined 18 0 1 2 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.MakerNote.Offset Long 1 796
Exif.MakerNote.ByteOrder Ascii 3 MM
Exif.Canon.0x0200 0x0300 0
Exif.Photo.UserComment Undefined 37 Chateaux de la Loire
Chambord
Exif.Photo.SubSecTime Ascii 3 81
Exif.Photo.SubSecTimeOriginal Ascii 3 81
Exif.Photo.SubSecTimeDigitized Ascii 3 81
Exif.Photo.FlashpixVersion Undefined 4 1.00
Exif.Photo.ColorSpace Short 1 sRGB
Exif.Photo.PixelXDimension Long 1 2888
Exif.Photo.PixelYDimension Long 1 1700
Exif.Photo.FocalPlaneXResolution Rational 1 4438.36
Exif.Photo.FocalPlaneYResolution Rational 1 4445.97
Exif.Photo.FocalPlaneResolutionUnit Short 1 inch
Exif.Photo.CustomRendered Short 1 Normal process
Exif.Photo.ExposureMode Short 1 Auto
Exif.Photo.WhiteBalance Short 1 Auto
Exif.Photo.SceneCaptureType Short 1 Standard
Exif.Photo.Contrast Short 1 Normal
Exif.Photo.Saturation Short 1 Normal
Exif.Image.GPSTag Long 1 867
Exif.GPSInfo.GPSVersionID Byte 4 2.0.0.0
Exif.GPSInfo.GPSLatitudeRef Ascii 2 North
Exif.GPSInfo.GPSLatitude Rational 3 47deg 36' 58.020"
Exif.GPSInfo.GPSLongitudeRef Ascii 2 East
Exif.GPSInfo.GPSLongitude Rational 3 1deg 31' 0.940"
Exif.GPSInfo.GPSAltitudeRef Byte 1 Above sea level
Exif.GPSInfo.GPSAltitude Rational 1 86 m
Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.JPEGInterchangeFormat Long 1 1055
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 4492
""",
"""File 1/1: $filename
Set Exif.Image.Software "GI" (Ascii)
"""
]
stderr = [
"""Warning: Directory Canon, entry 0x0200 has unknown Exif (TIFF) type 768; setting type size 1.
""",
"""Warning: Directory Canon, entry 0x0200 has unknown Exif (TIFF) type 768; setting type size 1.
Warning: Directory Canon, entry 0x0200 has unknown Exif (TIFF) type 768; setting type size 1.
"""
]
retval = [0] * 2
compare_stderr = system_tests.check_no_ASAN_UBSAN_errors
+81
View File
@@ -0,0 +1,81 @@
# -*- coding: utf-8 -*-
import system_tests
class PrettyPrintXmp(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/540"
filename = "$data_path/exiv2-bug540.jpg"
commands = ["$exiv2 -u -px $filename"]
stdout = ["""Xmp.dc.creator XmpSeq 1 Ian Britton
Xmp.dc.description LangAlt 1 lang="x-default" Communications
Xmp.dc.rights LangAlt 1 lang="x-default" ian Britton - FreeFoto.com
Xmp.dc.source XmpText 12 FreeFoto.com
Xmp.dc.subject XmpBag 1 Communications
Xmp.dc.title LangAlt 1 lang="x-default" Communications
Xmp.exif.ApertureValue XmpText 3 F16
Xmp.exif.BrightnessValue XmpText 8 0.260156
Xmp.exif.ColorSpace XmpText 1 sRGB
Xmp.exif.DateTimeOriginal XmpText 20 2002:07:13 15:58:28
Xmp.exif.ExifVersion XmpText 4 2.00
Xmp.exif.ExposureBiasValue XmpText 6 -13/20 EV
Xmp.exif.ExposureProgram XmpText 1 Shutter priority
Xmp.exif.FNumber XmpText 3 F0.6
Xmp.exif.FileSource XmpText 1 (0)
Xmp.exif.FlashpixVersion XmpText 4 1.00
Xmp.exif.FocalLength XmpText 3 0.0 mm
Xmp.exif.FocalPlaneResolutionUnit XmpText 1 inch
Xmp.exif.FocalPlaneXResolution XmpText 8 12.0508
Xmp.exif.FocalPlaneYResolution XmpText 8 12.0508
Xmp.exif.GPSLatitude XmpText 13 54,59.380000N
Xmp.exif.GPSLongitude XmpText 12 1,54.850000W
Xmp.exif.GPSMapDatum XmpText 5 WGS84
Xmp.exif.GPSTimeStamp XmpText 20 2002:07:13 14:58:24
Xmp.exif.GPSVersionID XmpText 7 2.0.0.0
Xmp.exif.ISOSpeedRatings XmpSeq 1 0
Xmp.exif.MeteringMode XmpText 1 Multi-segment
Xmp.exif.PixelXDimension XmpText 4 2400
Xmp.exif.PixelYDimension XmpText 4 1600
Xmp.exif.SceneType XmpText 1 (0)
Xmp.exif.SensingMethod XmpText 1 One-chip color area
Xmp.exif.ShutterSpeedValue XmpText 10 1/724 s
Xmp.pdf.Keywords XmpText 14 Communications
Xmp.photoshop.AuthorsPosition XmpText 12 Photographer
Xmp.photoshop.CaptionWriter XmpText 11 Ian Britton
Xmp.photoshop.Category XmpText 3 BUS
Xmp.photoshop.City XmpText 1
Xmp.photoshop.Country XmpText 14 Ubited Kingdom
Xmp.photoshop.Credit XmpText 11 Ian Britton
Xmp.photoshop.DateCreated XmpText 10 2002-06-20
Xmp.photoshop.Headline XmpText 14 Communications
Xmp.photoshop.State XmpText 1
Xmp.photoshop.SupplementalCategories XmpBag 1 Communications
Xmp.photoshop.Urgency XmpText 1 5
Xmp.tiff.Artist XmpText 11 Ian Britton
Xmp.tiff.BitsPerSample XmpSeq 1 8
Xmp.tiff.Compression XmpText 1 6
Xmp.tiff.Copyright LangAlt 1 lang="x-default" ian Britton - FreeFoto.com
Xmp.tiff.ImageDescription LangAlt 1 lang="x-default" Communications
Xmp.tiff.ImageLength XmpText 3 400
Xmp.tiff.ImageWidth XmpText 3 600
Xmp.tiff.Make XmpText 8 FUJIFILM
Xmp.tiff.Model XmpText 12 FinePixS1Pro
Xmp.tiff.Orientation XmpText 1 top, left
Xmp.tiff.ResolutionUnit XmpText 1 inch
Xmp.tiff.Software XmpText 19 Adobe Photoshop 7.0
Xmp.tiff.XResolution XmpText 5 300
Xmp.tiff.YCbCrPositioning XmpText 1 Co-sited
Xmp.tiff.YResolution XmpText 5 300
Xmp.xmp.CreateDate XmpText 20 2002-07-13T15:58:28Z
Xmp.xmp.ModifyDate XmpText 20 2002-07-19T13:28:10Z
Xmp.xmpBJ.JobRef XmpText 0 type="Bag"
Xmp.xmpBJ.JobRef[1] XmpText 0 type="Struct"
Xmp.xmpBJ.JobRef[1]/stJob:name XmpText 12 Photographer
Xmp.xmpMM.DocumentID XmpText 58 adobe:docid:photoshop:84d4dba8-9b11-11d6-895d-c4d063a70fb0
Xmp.xmpRights.Marked XmpText 4 True
Xmp.xmpRights.WebStatement XmpText 16 www.freefoto.com
"""]
stderr = [""]
retval = [0]
+29
View File
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class SettingExifImageDateTimeDateGivesValueTooLarge(
metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/554"
filename = "$data_path/exiv2-empty_copy.jpg"
commands = [
"""$exiv2 -u -v -M"set Exif.Image.DateTime Date 2007-05-27" $filename""",
"$exiv2 -u -pt $filename"
]
stdout = [
"""File 1/1: $filename
Set Exif.Image.DateTime "2007-05-27" (Date)
""",
"""Exif.Image.DateTime Undefined 8 50 48 48 55 48 53 50 55
"""
]
stderr = [
"""Error: 'Date' is not a valid Exif (TIFF) type; using type 'Undefined'.
""",
""
]
retval = [0] * 2
+113
View File
@@ -0,0 +1,113 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class UnicodeEncodingOfExifUserCommentTag(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/662"
filename = "$data_path/exiv2-empty_copy.jpg"
commands = [
"""$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 -PEnh $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 -PEnh $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 -PEnh $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 -PEnh $filename",
]
stdout = [
"",
"""ExifTag
0000 1a 00 00 00 ....
UserComment
0000 41 53 43 49 49 00 00 00 41 6e 20 61 73 63 69 69 ASCII...An ascii
0010 20 63 6f 6d 6d 65 6e 74 comment
""",
"",
"""ExifTag
0000 1a 00 00 00 ....
UserComment
0000 41 53 43 49 49 00 00 00 41 0a 6e 65 77 6c 69 6e ASCII...A.newlin
0010 65 e
""",
"",
"""ExifTag
0000 1a 00 00 00 ....
UserComment
0000 55 4e 49 43 4f 44 45 00 41 00 20 00 55 00 6e 00 UNICODE.A. .U.n.
0010 69 00 63 00 6f 00 64 00 65 00 20 00 63 00 6f 00 i.c.o.d.e. .c.o.
0020 6d 00 6d 00 65 00 6e 00 74 00 m.m.e.n.t.
""",
"",
"""ExifTag
0000 1a 00 00 00 ....
UserComment
0000 55 4e 49 43 4f 44 45 00 c4 01 UNICODE...
""",
"",
"""ExifTag
0000 1a 00 00 00 ....
UserComment
0000 55 4e 49 43 4f 44 45 00 41 00 c4 01 43 00 UNICODE.A...C.
""",
"",
"""ExifTag
0000 1a 00 00 00 ....
UserComment
0000 55 4e 49 43 4f 44 45 00 57 00 69 00 74 00 68 00 UNICODE.W.i.t.h.
0010 0a 00 4e 00 65 00 77 00 6c 00 69 00 6e 00 65 00 ..N.e.w.l.i.n.e.
""",
"",
"""ExifTag
0000 1a 00 00 00 ....
UserComment
0000 55 4e 49 43 4f 44 45 00 57 00 69 00 74 00 68 00 UNICODE.W.i.t.h.
0010 09 00 54 00 61 00 62 00 ..T.a.b.
""",
"",
"""ExifTag
0000 1a 00 00 00 ....
UserComment
0000 55 4e 49 43 4f 44 45 00 5c 00 75 00 67 00 67 00 UNICODE.\.u.g.g.
0010 67 00 67 00 g.g.
"""
]
stderr = [""] * 16
retval = [0] * 16
+52
View File
@@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class OptimizeBinaryArrayElements(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/666"
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 -pa -u -b $filename"
]
stdout = [
"""File 1/1: $filename
Set Exif.Image.Make "NIKON" (Ascii)
Set Exif.Image.Model "D90" (Ascii)
Set Exif.Nikon3.ShutterCount "100" (Long)
Set Exif.Nikon3.SerialNumber "123" (Ascii)
Set Exif.NikonSi02xx.Version "48 50 51 52" (Byte)
Set Exif.NikonSi02xx.ShutterCount "100" (Long)
""",
"""Exif.Image.Make Ascii 6 NIKON
Exif.Image.Model Ascii 4 D90
Exif.Image.ExifTag Long 1 56
Exif.Photo.MakerNote Undefined 694 78 105 107 111 110 0 2 16 0 0 73 73 42 0 8 0 0 0 3 0 167 0 4 0 1 0 0 0 100 0 0 0 29 0 2 0 4 0 0 0 49 50 51 0 145 0 7 0 122 2 0 0 50 0 0 0 0 0 0 0 48 50 51 52 21 164 34 143 235 54 112 153 177 184 174 147 103 42 220 125 13 140 250 87 163 222 8 33 41 32 6 219 159 82 244 133 5 116 210 31 91 134 160 169 161 136 94 35 215 122 12 141 253 92 170 231 19 46 56 49 25 240 182 107 15 162 36 149 245 68 130 175 203 214 208 185 145 88 14 179 71 202 60 157 237 44 90 119 131 126 104 65 9 192 102 251 127 242 84 165 229 20 50 63 59 38 0 201 129 40 190 67 183 26 108 173 221 252 10 7 243 206 152 81 249 144 22 139 239 66 132 181 213 228 226 207 171 118 48 217 113 248 110 211 39 106 156 189 205 204 186 151 99 30 200 97 233 96 198 27 95 146 180 197 197 180 146 95 27 198 96 233 97 200 30 99 151 186 204 205 189 156 106 39 211 110 248 113 217 48 118 171 207 226 228 213 181 132 66 239 139 22 144 249 81 152 206 243 7 10 252 221 173 108 26 183 67 190 40 129 201 0 38 59 63 50 20 229 165 84 242 127 251 102 192 9 65 104 126 131 119 90 44 237 157 60 202 71 179 14 88 145 185 208 214 203 175 130 68 245 149 36 162 15 107 182 240 25 49 56 46 19 231 170 92 253 141 12 122 215 35 94 136 161 169 160 134 91 31 210 116 5 133 244 82 159 219 6 32 41 33 8 222 163 87 250 140 13 125 220 42 103 147 174 184 177 153 112 54 235 143 34 164 21 117 196 2 47 75 86 80 57 17 216 142 51 199 74 188 29 109 172 218 247 3 254 232 193 137 64 230 123 255 114 212 37 101 148 178 191 187 166 128 73 1 168 62 195 55 154 236 45 93 124 138 135 115 78 24 209 121 16 150 11 111 194 4 53 85 100 98 79 43 246 176 89 241 120 238 83 167 234 28 61 77 76 58 23 227 158 72 225 105 224 70 155 223 18 52 69 69 52 18 223 155 70 224 105 225 72 158 227 23 58 76 77 61 28 234 167 83 238 120 241 89 176 246 43 79 98 100 85 53 4 194 111 11 150 16 121 209 24 78 115 135 138 124 93 45 236 154 55 195 62 168 1 73 128 166 187 191 178 148 101 37 212 114 255 123 230 64 137 193 232 254 3 247 218 172 109 29 188 74 199 51 142 216 17 57 80 86 75 47 2 196 117 21 164 34 143 235 54 112 153 177 184 174 147 103 42 220 125 13 140 250 87 163 222 8 33 41 32 6 219 159 82 244 133 5 116 210 31 91 134 160 169 161 136 94 35 215 122 12 141 253 92 170 231 19 46 56 49 25 240 182 107 15 162 36 149 245 68 130 175 203 214 208 185 145 88 14 179 71 202 60 157 237 44 90 119 131 126 104 65 9 192 102 251 127 242 84 165 229 20 50 63 59 38 0 201 129 40 190 67 183 26 108 173 221 252 10 7 243 170
Exif.MakerNote.Offset Long 1 74
Exif.MakerNote.ByteOrder Ascii 3 II
Exif.Nikon3.ShutterCount Long 1 100
Exif.Nikon3.SerialNumber Ascii 4 123
Exif.NikonSi02xx.Version Undefined 4 2.34
Exif.NikonSi02xx.0x0004 Byte 102 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.NikonSi02xx.ShutterCount1 Long 1 0
Exif.NikonSi02xx.DeletedImageCount Long 1 0
Exif.NikonSi02xx.0x0072 Byte 3 0 0 0
Exif.NikonSi02xx.VibrationReduction Byte 1 Off
Exif.NikonSi02xx.0x0076 Byte 12 0 0 0 0 0 0 0 0 0 0 0 0
Exif.NikonSi02xx.VibrationReduction1 Byte 1 Off
Exif.NikonSi02xx.0x0083 Byte 212 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.NikonSi02xx.ShutterCount2 Undefined 2 0 0
Exif.NikonSi02xx.0x0159 Byte 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.NikonSi02xx.VibrationReduction2 Byte 1 n/a
Exif.NikonSi02xx.0x01af Byte 167 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.NikonSi02xx.ISO Byte 1 3
Exif.NikonSi02xx.0x0257 Byte 31 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Exif.NikonSi02xx.ShutterCount Long 1 100
"""
]
stderr = [""] * 2
retval = [0] * 2
+27
View File
@@ -0,0 +1,27 @@
# -*- coding: utf-8 -*-
import os
import shutil
import system_tests
class PercentABrokenInRename(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/683"
original_file = "$data_path/exiv2-nikon-d70.jpg"
filename = "$data_path/exiv2-nikon-d70_copy.jpg"
new_file = "$data_path/2004-03-30-Tue-090.jpg"
commands = ["$exiv2 -u -f -r %Y-%m-%d-%a-%j $filename"]
stdout = [""]
stderr = [""]
retval = [0]
def setUp(self):
shutil.copyfile(self.original_file, self.filename)
def tearDown(self):
self.assertTrue(os.path.exists(self.new_file))
os.remove(self.new_file)
+210
View File
@@ -0,0 +1,210 @@
# -*- coding: utf-8 -*-
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 -PEkyct $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 -PEkyct $filename",
]
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class LittleEndianORFFilesFromE_PL1Corrupted(metaclass=system_tests.CaseMeta):
filename = "$data_path/exiv2-empty_copy.jpg"
commands = COMMANDS
stdout = [
"""File 1/1: $filename
Set Exif.Image.ProcessingSoftware "Initial values, read from the command line" (Ascii)
Set Exif.Image.DocumentName "0.12345" (Float)
Set Exif.Image.ImageDescription "0.987654321" (Double)
""",
"""File 1/1: $filename
Exif.Image.ProcessingSoftware Ascii 43 Initial values, read from the command line
Exif.Image.DocumentName Float 1 0.123450003564358
Exif.Image.ImageDescription Double 1 0.987654321
""",
"""File 1/1: $filename
Set Exif.Image.ProcessingSoftware "Non-intrusive update" (Ascii)
""",
"""File 1/1: $filename
Exif.Image.ProcessingSoftware Ascii 21 Non-intrusive update
Exif.Image.DocumentName Float 1 0.123450003564358
Exif.Image.ImageDescription Double 1 0.987654321
""",
"""File 1/1: $filename
Set Exif.Image.ProcessingSoftware "Intrusive update, writing the structure from scratch" (Ascii)
""",
"""File 1/1: $filename
Exif.Image.ProcessingSoftware Ascii 53 Intrusive update, writing the structure from scratch
Exif.Image.DocumentName Float 1 0.123450003564358
Exif.Image.ImageDescription Double 1 0.987654321
"""
]
stderr = [""] * 6
retval = [0] * 6
@system_tests.CopyFiles("$data_path/exiv2-kodak-dc210.jpg")
class BigEndianORFFilesFromE_PL1Corrupted(metaclass=system_tests.CaseMeta):
filename = "$data_path/exiv2-kodak-dc210_copy.jpg"
commands = COMMANDS
stdout = [
"""File 1/1: $filename
Set Exif.Image.ProcessingSoftware "Initial values, read from the command line" (Ascii)
Set Exif.Image.DocumentName "0.12345" (Float)
Set Exif.Image.ImageDescription "0.987654321" (Double)
""",
"""File 1/1: $filename
Exif.Image.ProcessingSoftware Ascii 43 Initial values, read from the command line
Exif.Image.DocumentName Float 1 0.123450003564358
Exif.Image.ImageDescription Double 1 0.987654321
Exif.Image.Make Ascii 22 Eastman Kodak Company
Exif.Image.Model Ascii 20 DC210 Zoom (V05.00)
Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 216
Exif.Image.YResolution Rational 1 216
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.Copyright Ascii 0
Exif.Image.ExifTag Long 1 268
Exif.Photo.ExposureTime Rational 1 1/30 s
Exif.Photo.FNumber Rational 1 F4
Exif.Photo.ExifVersion Undefined 4 1.10
Exif.Photo.DateTimeOriginal Ascii 20 2000:10:26 16:46:51
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.CompressedBitsPerPixel Rational 1 (0/0)
Exif.Photo.ShutterSpeedValue SRational 1 1/32 s
Exif.Photo.ApertureValue Rational 1 F4
Exif.Photo.BrightnessValue SRational 1 1.5
Exif.Photo.ExposureBiasValue SRational 1 0 EV
Exif.Photo.MaxApertureValue Rational 1 F4
Exif.Photo.SubjectDistance Rational 1 Unknown
Exif.Photo.MeteringMode Short 1 Center weighted average
Exif.Photo.LightSource Short 1 Unknown
Exif.Photo.Flash Short 1 Fired
Exif.Photo.FocalLength Rational 1 4.4 mm
Exif.Photo.MakerNote Undefined 72 1 4 3 0 2 1 255 255 0 1 55 142 14 93 109 246 1 0 0 251 0 4 255 32 0 0 40 0 0 0 12 53 68 67 80 48 49 48 49 49 46 74 80 71 0 4 0 0 0 1 228 224 0 1 0 0 0 1 145 128 0 1 194 64 0 1 0 0 0 1 222 16
Exif.Thumbnail.ImageWidth Short 1 96
Exif.Thumbnail.ImageLength Short 1 72
Exif.Thumbnail.BitsPerSample Short 3 8 8 8
Exif.Thumbnail.Compression Short 1 Uncompressed
Exif.Thumbnail.PhotometricInterpretation Short 1 RGB
Exif.Thumbnail.StripOffsets Short 1 822
Exif.Thumbnail.SamplesPerPixel Short 1 3
Exif.Thumbnail.RowsPerStrip Short 1 72
Exif.Thumbnail.StripByteCounts Short 1 20736
Exif.Thumbnail.XResolution Rational 1 72
Exif.Thumbnail.YResolution Rational 1 72
Exif.Thumbnail.ResolutionUnit Short 1 inch
""",
"""File 1/1: $filename
Set Exif.Image.ProcessingSoftware "Non-intrusive update" (Ascii)
""",
"""File 1/1: $filename
Exif.Image.ProcessingSoftware Ascii 21 Non-intrusive update
Exif.Image.DocumentName Float 1 0.123450003564358
Exif.Image.ImageDescription Double 1 0.987654321
Exif.Image.Make Ascii 22 Eastman Kodak Company
Exif.Image.Model Ascii 20 DC210 Zoom (V05.00)
Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 216
Exif.Image.YResolution Rational 1 216
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.Copyright Ascii 0
Exif.Image.ExifTag Long 1 268
Exif.Photo.ExposureTime Rational 1 1/30 s
Exif.Photo.FNumber Rational 1 F4
Exif.Photo.ExifVersion Undefined 4 1.10
Exif.Photo.DateTimeOriginal Ascii 20 2000:10:26 16:46:51
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.CompressedBitsPerPixel Rational 1 (0/0)
Exif.Photo.ShutterSpeedValue SRational 1 1/32 s
Exif.Photo.ApertureValue Rational 1 F4
Exif.Photo.BrightnessValue SRational 1 1.5
Exif.Photo.ExposureBiasValue SRational 1 0 EV
Exif.Photo.MaxApertureValue Rational 1 F4
Exif.Photo.SubjectDistance Rational 1 Unknown
Exif.Photo.MeteringMode Short 1 Center weighted average
Exif.Photo.LightSource Short 1 Unknown
Exif.Photo.Flash Short 1 Fired
Exif.Photo.FocalLength Rational 1 4.4 mm
Exif.Photo.MakerNote Undefined 72 1 4 3 0 2 1 255 255 0 1 55 142 14 93 109 246 1 0 0 251 0 4 255 32 0 0 40 0 0 0 12 53 68 67 80 48 49 48 49 49 46 74 80 71 0 4 0 0 0 1 228 224 0 1 0 0 0 1 145 128 0 1 194 64 0 1 0 0 0 1 222 16
Exif.Thumbnail.ImageWidth Short 1 96
Exif.Thumbnail.ImageLength Short 1 72
Exif.Thumbnail.BitsPerSample Short 3 8 8 8
Exif.Thumbnail.Compression Short 1 Uncompressed
Exif.Thumbnail.PhotometricInterpretation Short 1 RGB
Exif.Thumbnail.StripOffsets Short 1 822
Exif.Thumbnail.SamplesPerPixel Short 1 3
Exif.Thumbnail.RowsPerStrip Short 1 72
Exif.Thumbnail.StripByteCounts Short 1 20736
Exif.Thumbnail.XResolution Rational 1 72
Exif.Thumbnail.YResolution Rational 1 72
Exif.Thumbnail.ResolutionUnit Short 1 inch
""",
"""File 1/1: $filename
Set Exif.Image.ProcessingSoftware "Intrusive update, writing the structure from scratch" (Ascii)
""",
"""File 1/1: $filename
Exif.Image.ProcessingSoftware Ascii 53 Intrusive update, writing the structure from scratch
Exif.Image.DocumentName Float 1 0.123450003564358
Exif.Image.ImageDescription Double 1 0.987654321
Exif.Image.Make Ascii 22 Eastman Kodak Company
Exif.Image.Model Ascii 20 DC210 Zoom (V05.00)
Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 216
Exif.Image.YResolution Rational 1 216
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.Copyright Ascii 0
Exif.Image.ExifTag Long 1 278
Exif.Photo.ExposureTime Rational 1 1/30 s
Exif.Photo.FNumber Rational 1 F4
Exif.Photo.ExifVersion Undefined 4 1.10
Exif.Photo.DateTimeOriginal Ascii 20 2000:10:26 16:46:51
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.CompressedBitsPerPixel Rational 1 (0/0)
Exif.Photo.ShutterSpeedValue SRational 1 1/32 s
Exif.Photo.ApertureValue Rational 1 F4
Exif.Photo.BrightnessValue SRational 1 1.5
Exif.Photo.ExposureBiasValue SRational 1 0 EV
Exif.Photo.MaxApertureValue Rational 1 F4
Exif.Photo.SubjectDistance Rational 1 Unknown
Exif.Photo.MeteringMode Short 1 Center weighted average
Exif.Photo.LightSource Short 1 Unknown
Exif.Photo.Flash Short 1 Fired
Exif.Photo.FocalLength Rational 1 4.4 mm
Exif.Photo.MakerNote Undefined 72 1 4 3 0 2 1 255 255 0 1 55 142 14 93 109 246 1 0 0 251 0 4 255 32 0 0 40 0 0 0 12 53 68 67 80 48 49 48 49 49 46 74 80 71 0 4 0 0 0 1 228 224 0 1 0 0 0 1 145 128 0 1 194 64 0 1 0 0 0 1 222 16
Exif.Thumbnail.ImageWidth Short 1 96
Exif.Thumbnail.ImageLength Short 1 72
Exif.Thumbnail.BitsPerSample Short 3 8 8 8
Exif.Thumbnail.Compression Short 1 Uncompressed
Exif.Thumbnail.PhotometricInterpretation Short 1 RGB
Exif.Thumbnail.StripOffsets Short 1 832
Exif.Thumbnail.SamplesPerPixel Short 1 3
Exif.Thumbnail.RowsPerStrip Short 1 72
Exif.Thumbnail.StripByteCounts Short 1 20736
Exif.Thumbnail.XResolution Rational 1 72
Exif.Thumbnail.YResolution Rational 1 72
Exif.Thumbnail.ResolutionUnit Short 1 inch
"""
]
stderr = [""] * 6
retval = [0] * 6
+66
View File
@@ -0,0 +1,66 @@
# -*- 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)
""",
"",
"""<?xpacket begin="\ufeff" 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:imageapp="orig/"
imageapp:uuid="abcd"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>""",
"""File 1/1: $filename
Reg imageapp="dest/"
Set Xmp.imageapp.uuid "abcd" (XmpText)
""",
"",
"""<?xpacket begin="\ufeff" 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:imageapp="orig/"
imageapp:uuid="abcd"/>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>"""
]
stderr = [
"",
"",
"",
"""Warning: Updating namespace URI for imageapp from orig/ to dest/
""",
"""Warning: Updating namespace URI for imageapp from dest/ to orig/
""",
""
]
retval = [0] * 6
+36
View File
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class AssertionSvEqualsDFailedRegression(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/769"
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 -PEkyct $filename"
]
stdout = [
"""File 1/1: $filename
Add Exif.Image.Make "Canon" (Ascii)
Add Exif.CanonCs.0x0001 "1" (Short)
Add Exif.CanonCs.0x0000 "2" (Short)
""",
"""File 1/1: $filename
Exif.Image.Make Ascii 6 Canon
Exif.Image.ExifTag Long 1 44
Exif.Photo.MakerNote Undefined 18 1 0 1 0 3 0 2 0 0 0 4 0 1 0 0 0 0 0
Exif.MakerNote.Offset Long 1 62
Exif.MakerNote.ByteOrder Ascii 3 II
Exif.CanonCs.0x0000 Short 1 4
Exif.CanonCs.Macro Short 1 On
"""
]
stderr = [""] * 2
retval = [0] * 2
+59
View File
@@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
import system_tests
@system_tests.CopyFiles("$data_path/exiv2-bug784.jpg")
class WritingXmpLrHierarchicalSubjectWritesWrongDatatype(
metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/784"
filename = "$data_path/exiv2-bug784_copy.jpg"
commands = [
"$exiv2 -px $filename",
"""$exiv2 -M"add Xmp.lr.hierarchicalSubject root|1st|2nd|3rd|4th|5th" $filename""",
"$exiv2 -px $filename",
]
stdout = [
"""Xmp.dc.format XmpText 10 image/jpeg
Xmp.dc.rights LangAlt 1 lang="x-default" Public Domain. Do whatever you like with this image
Xmp.dc.subject XmpBag 6 1st, 2nd, next1, next2, root, root0
Xmp.xmpMM.DocumentID XmpText 32 004D48F936062EF5085A81BF96D4C494
Xmp.xmpMM.OriginalDocumentID XmpText 32 004D48F936062EF5085A81BF96D4C494
Xmp.xmpMM.InstanceID XmpText 44 xmp.iid:f74f0d02-e921-134e-8107-1dda17aad853
Xmp.xmpMM.History XmpText 0 type="Seq"
Xmp.xmpMM.History[1] XmpText 0 type="Struct"
Xmp.xmpMM.History[1]/stEvt:action XmpText 5 saved
Xmp.xmpMM.History[1]/stEvt:instanceID XmpText 44 xmp.iid:f74f0d02-e921-134e-8107-1dda17aad853
Xmp.xmpMM.History[1]/stEvt:when XmpText 25 2015-03-24T20:35:55-05:00
Xmp.xmpMM.History[1]/stEvt:softwareAgent XmpText 39 Adobe Photoshop Lightroom 4.4 (Windows)
Xmp.xmpMM.History[1]/stEvt:changed XmpText 9 /metadata
Xmp.xmp.MetadataDate XmpText 25 2015-03-24T20:35:55-05:00
Xmp.crs.RawFileName XmpText 12 exiv2.lr.jpg
Xmp.lr.hierarchicalSubject XmpBag 2 root0|next1|next2, root|1st|2nd
""",
"",
"""Xmp.dc.format XmpText 10 image/jpeg
Xmp.dc.rights LangAlt 1 lang="x-default" Public Domain. Do whatever you like with this image
Xmp.dc.subject XmpBag 6 1st, 2nd, next1, next2, root, root0
Xmp.xmpMM.DocumentID XmpText 32 004D48F936062EF5085A81BF96D4C494
Xmp.xmpMM.OriginalDocumentID XmpText 32 004D48F936062EF5085A81BF96D4C494
Xmp.xmpMM.InstanceID XmpText 44 xmp.iid:f74f0d02-e921-134e-8107-1dda17aad853
Xmp.xmpMM.History XmpText 0 type="Seq"
Xmp.xmpMM.History[1] XmpText 0 type="Struct"
Xmp.xmpMM.History[1]/stEvt:action XmpText 5 saved
Xmp.xmpMM.History[1]/stEvt:instanceID XmpText 44 xmp.iid:f74f0d02-e921-134e-8107-1dda17aad853
Xmp.xmpMM.History[1]/stEvt:when XmpText 25 2015-03-24T20:35:55-05:00
Xmp.xmpMM.History[1]/stEvt:softwareAgent XmpText 39 Adobe Photoshop Lightroom 4.4 (Windows)
Xmp.xmpMM.History[1]/stEvt:changed XmpText 9 /metadata
Xmp.xmp.MetadataDate XmpText 25 2015-03-24T20:35:55-05:00
Xmp.crs.RawFileName XmpText 12 exiv2.lr.jpg
Xmp.lr.hierarchicalSubject XmpBag 1 root|1st|2nd|3rd|4th|5th
"""
]
stderr = [""] * 3
retval = [0] * 3
+122
View File
@@ -0,0 +1,122 @@
# -*- coding: utf-8 -*-
import system_tests
import os
@system_tests.DeleteFiles("$xmpfile")
@system_tests.CopyFiles("$data_path/exiv2-empty.jpg")
class WrongXmpTypeForNestedXmpKeys(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/$num"
num = 799
cmdfile = os.path.join("$data_path", "bug$num.cmd")
filename_common = os.path.join("$data_path", "exiv2-empty_copy")
filename = "$filename_common.jpg"
xmpfile = "$filename_common.xmp"
commands = [
"$exiv2 -v -m $cmdfile $filename",
"$exiv2 -v -pa $filename",
"$exiv2 -f -eX $filename",
"$cat $xmpfile",
]
stdout = [
"""File 1/1: $filename
Set Xmp.MP.RegionInfo/MPRI:Regions "" (XmpBag)
Set Xmp.MP.RegionInfo/MPRI:Regions[1]/MPReg:Rectangle "0.11, 0.22, 0.33, 0.44" (XmpText)
Set Xmp.MP.RegionInfo/MPRI:Regions[1]/MPReg:PersonDisplayName "Baby Gnu" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:AppliedToDimensions/stDim:w "1600" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:AppliedToDimensions/stDim:h "800" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:AppliedToDimensions/stDim:unit "pixel" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:RegionList "" (XmpBag)
Set Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Name "Baby Gnu" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Type "Face" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:x "0.275312" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:y "0.3775" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:w "0.164375" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:h "0.28125" (XmpText)
Set Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:unit "normalized" (XmpText)
""",
"""File 1/1: $filename
Xmp.MP.RegionInfo XmpText 0 type="Struct"
Xmp.MP.RegionInfo/MPRI:Regions XmpText 0 type="Bag"
Xmp.MP.RegionInfo/MPRI:Regions[1] XmpText 0 type="Struct"
Xmp.MP.RegionInfo/MPRI:Regions[1]/MPReg:Rectangle XmpText 22 0.11, 0.22, 0.33, 0.44
Xmp.MP.RegionInfo/MPRI:Regions[1]/MPReg:PersonDisplayName XmpText 8 Baby Gnu
Xmp.mwg-rs.Regions XmpText 0 type="Struct"
Xmp.mwg-rs.Regions/mwg-rs:AppliedToDimensions XmpText 0 type="Struct"
Xmp.mwg-rs.Regions/mwg-rs:AppliedToDimensions/stDim:w XmpText 4 1600
Xmp.mwg-rs.Regions/mwg-rs:AppliedToDimensions/stDim:h XmpText 3 800
Xmp.mwg-rs.Regions/mwg-rs:AppliedToDimensions/stDim:unit XmpText 5 pixel
Xmp.mwg-rs.Regions/mwg-rs:RegionList XmpText 0 type="Bag"
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1] XmpText 0 type="Struct"
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Name XmpText 8 Baby Gnu
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Type XmpText 4 Face
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area XmpText 0 type="Struct"
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:x XmpText 8 0.275312
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:y XmpText 6 0.3775
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:w XmpText 8 0.164375
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:h XmpText 7 0.28125
Xmp.mwg-rs.Regions/mwg-rs:RegionList[1]/mwg-rs:Area/stArea:unit XmpText 10 normalized
""",
"",
"""<?xpacket begin="\ufeff" 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:MP="http://ns.microsoft.com/photo/1.2/"
xmlns:MPRI="http://ns.microsoft.com/photo/1.2/t/RegionInfo#"
xmlns:MPReg="http://ns.microsoft.com/photo/1.2/t/Region#"
xmlns:mwg-rs="http://www.metadataworkinggroup.com/schemas/regions/"
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
xmlns:stArea="http://ns.adobe.com/xmp/sType/Area#">
<MP:RegionInfo rdf:parseType="Resource">
<MPRI:Regions>
<rdf:Bag>
<rdf:li
MPReg:Rectangle="0.11, 0.22, 0.33, 0.44"
MPReg:PersonDisplayName="Baby Gnu"/>
</rdf:Bag>
</MPRI:Regions>
</MP:RegionInfo>
<mwg-rs:Regions rdf:parseType="Resource">
<mwg-rs:AppliedToDimensions
stDim:w="1600"
stDim:h="800"
stDim:unit="pixel"/>
<mwg-rs:RegionList>
<rdf:Bag>
<rdf:li>
<rdf:Description
mwg-rs:Name="Baby Gnu"
mwg-rs:Type="Face">
<mwg-rs:Area
stArea:x="0.275312"
stArea:y="0.3775"
stArea:w="0.164375"
stArea:h="0.28125"
stArea:unit="normalized"/>
</rdf:Description>
</rdf:li>
</rdf:Bag>
</mwg-rs:RegionList>
</mwg-rs:Regions>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end="w"?>"""
]
stderr = [
"",
"""$filename: No Exif data found in the file
$filename: No IPTC data found in the file
""",
"",
""
]
retval = [0] * 4
+127
View File
@@ -0,0 +1,127 @@
# -*- coding: utf-8 -*-
import itertools
import system_tests
TYPES = ["8BIM", "AgHg", "DCSR", "PHUT"]
FORMATS = ["jpg", "psd"]
def make_commands(filename):
return [
"""$exiv2 -u -v -M"set Exif.Photo.UserComment Test" """ + filename,
"$exiv2 -u -pt " + filename
]
def make_filename(irb_type, img_format):
return "$data_path/exiv2-bug800-" + irb_type + "_copy." + img_format
def make_stdout(irb_type, img_format):
first = """File 1/1: """ + make_filename(irb_type, img_format) + """
Set Exif.Photo.UserComment "Test" (Comment)
"""
if img_format == "jpg":
second = """Exif.Image.Orientation Short 1 top, left
Exif.Image.XResolution Rational 1 180
Exif.Image.YResolution Rational 1 180
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.Software Ascii 16 QuickTime 6.5.2
Exif.Image.DateTime Ascii 20 2005:03:27 19:46:52
Exif.Image.HostComputer Ascii 16 Mac OS X 10.3.8
Exif.Image.YCbCrPositioning Short 1 Centered
Exif.Image.ExifTag Long 1 190
Exif.Photo.ExposureTime Rational 1 1/200 s
Exif.Photo.FNumber Rational 1 F7.1
Exif.Photo.ExifVersion Undefined 4 2.20
Exif.Photo.DateTimeOriginal Ascii 20 2005:03:18 22:15:08
Exif.Photo.DateTimeDigitized Ascii 20 2005:03:18 22:15:08
Exif.Photo.ComponentsConfiguration Undefined 4 YCbCr
Exif.Photo.CompressedBitsPerPixel Rational 1 5
Exif.Photo.ShutterSpeedValue SRational 1 1/202 s
Exif.Photo.ApertureValue Rational 1 F7.1
Exif.Photo.ExposureBiasValue SRational 1 0 EV
Exif.Photo.MaxApertureValue Rational 1 F2.8
Exif.Photo.MeteringMode Short 1 Multi-segment
Exif.Photo.Flash Short 1 No, auto
Exif.Photo.FocalLength Rational 1 7.4 mm
Exif.Photo.MakerNote Undefined 590 (Binary value suppressed)
Exif.Photo.UserComment Undefined 12 Test
Exif.Photo.FlashpixVersion Undefined 4 1.00
Exif.Photo.PixelXDimension Short 1 2272
Exif.Photo.PixelYDimension Short 1 1704
Exif.Photo.FocalPlaneXResolution Rational 1 8114.29
Exif.Photo.FocalPlaneYResolution Rational 1 8114.29
Exif.Photo.FocalPlaneResolutionUnit Short 1 inch
Exif.Photo.SensingMethod Short 1 One-chip color area
Exif.Photo.FileSource Undefined 1 Digital still camera
Exif.Photo.CustomRendered Short 1 Normal process
Exif.Photo.ExposureMode Short 1 Auto
Exif.Photo.WhiteBalance Short 1 Auto
Exif.Photo.DigitalZoomRatio Rational 1 1.0
Exif.Photo.SceneCaptureType Short 1 Standard
"""
elif img_format == 'psd':
second = """Exif.Image.ImageWidth Short 1 150
Exif.Image.ImageLength Short 1 91
Exif.Image.BitsPerSample Short 3 8 8 8
Exif.Image.Orientation Short 1 top, left
Exif.Image.SamplesPerPixel Short 1 3
Exif.Image.XResolution Rational 1 72
Exif.Image.YResolution Rational 1 72
Exif.Image.ResolutionUnit Short 1 inch
Exif.Image.Software Ascii 30 Adobe Photoshop CS5 Macintosh
Exif.Image.DateTime Ascii 20 2011:06:27 21:41:02
Exif.Image.ExifTag Long 1 218
Exif.Photo.ExifVersion Undefined 4 2.21
Exif.Photo.UserComment Undefined 12 Test
Exif.Photo.ColorSpace Short 1 Uncalibrated
Exif.Photo.PixelXDimension Long 1 150
Exif.Photo.PixelYDimension Long 1 91
Exif.Thumbnail.Compression Short 1 JPEG (old-style)
Exif.Thumbnail.XResolution Rational 1 72
Exif.Thumbnail.YResolution Rational 1 72
Exif.Thumbnail.ResolutionUnit Short 1 inch
Exif.Thumbnail.JPEGInterchangeFormat Long 1 390
Exif.Thumbnail.JPEGInterchangeFormatLength Long 1 0
"""
return [first, second]
FILES = [
make_filename(irb_type, img_format)
for irb_type, img_format in itertools.product(TYPES, FORMATS)
]
ORIGINAL_FILES = [
"$data_path/exiv2-bug800-" + irb_type + "." + img_format
for irb_type, img_format in itertools.product(TYPES, FORMATS)
]
@system_tests.CopyFiles(*ORIGINAL_FILES)
class MissingPhotoshopIrbTypes(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/800"
types = ["8BIM", "AgHg", "DCSR", "PHUT"]
formats = ["jpg", "psd"]
commands = list(
itertools.chain.from_iterable(
make_commands(fname) for fname in FILES
)
)
stdout = list(
itertools.chain.from_iterable(
make_stdout(irb_type, img_format)
for irb_type, img_format in itertools.product(TYPES, FORMATS)
)
)
stderr = [""] * 16
retval = [0] * 16
+59
View File
@@ -0,0 +1,59 @@
# -*- coding: utf-8 -*-
import os
import shutil
import system_tests
class DoNotDestroyHardLinks(metaclass=system_tests.CaseMeta):
def setUp(self):
shutil.copy(self.orig_file, self.filename)
os.link(self.filename, self.link_1)
os.link(self.filename, self.link_2)
def tearDown(self):
for f in [self.filename, self.link_1, self.link_2]:
os.remove(f)
url = "http://dev.exiv2.org/issues/812"
num = 812
# original file, copy & hardlinks
orig_file = "$data_path/exiv2-bug884c.jpg"
filename = "$data_path/exiv2-bug$num.jpg"
link_1 = "$data_path/exiv2-bug$num-B.jpg"
link_2 = "$data_path/exiv2-bug$num-C.jpg"
# list of files passed to exiv2 since we can't use * in the command
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 -PE -g UserComment $file_list",
"""$exiv2 -u -v -M"set Exif.Photo.UserComment Test Bug $num modified" $filename""",
"$exiv2 -PE -g UserComment $file_list"
]
first_change = "Exif.Photo.UserComment Undefined 20 Test Bug 812"
second_change = "Exif.Photo.UserComment Undefined 29 Test Bug 812 modified"
stdout = [
"""File 1/1: $filename
Set Exif.Photo.UserComment "Test Bug 812" (Comment)
""",
"""$filename $first_change
$link_1 $first_change
$link_2 $first_change
""",
"""File 1/1: $filename
Set Exif.Photo.UserComment "Test Bug 812 modified" (Comment)
""",
"""$filename $second_change
$link_1 $second_change
$link_2 $second_change
"""
]
stderr = [""] * 4
retval = [0] * 4
+36
View File
@@ -0,0 +1,36 @@
# -*- coding: utf-8 -*-
import system_tests
class DetectionOfSigma55_200mmLens(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/816"
filenames = [
"$data_path/exiv2-bug816{!s}.exv".format(char)
for char in ["a", "b", "c", "d", "e"]
]
commands = [
"$exiv2 -pa --grep Lens " + filename for filename in filenames
]
stdout = [
"""Exif.Pentax.LensType Byte 2 Sigma 55-200mm F4-5.6 DC
Exif.Pentax.LensInfo Undefined 36 3 255 0 0 40 148 71 152 80 6 241 65 237 153 88 36 1 76 107 251 255 255 255 0 0 80 6 241 0 0 0 0 0 0 0 0
""",
"""Exif.PentaxDng.LensType Byte 3 Sigma 55-200mm F4-5.6 DC
Exif.PentaxDng.LensInfo Undefined 69 131 0 0 255 0 40 148 68 244 112 6 243 65 197 153 88 35 1 73 107 251 255 255 255 0 0 112 6 243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
""",
"""Exif.Pentax.LensType Byte 3 Sigma 55-200mm F4-5.6 DC
Exif.Pentax.LensInfo Undefined 69 131 0 0 255 0 40 148 68 244 112 6 243 65 197 153 88 35 1 73 107 251 255 255 255 0 0 112 6 243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
""",
"""Exif.Pentax.LensType Byte 3 Sigma 55-200mm F4-5.6 DC
Exif.Pentax.LensInfo Undefined 69 131 0 0 255 0 40 148 68 244 112 6 243 65 197 153 88 35 1 73 107 251 255 255 255 0 0 112 6 243 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
""",
"""Exif.PentaxDng.LensType Byte 4 Sigma 55-200mm F4-5.6 DC
Exif.PentaxDng.LensInfo Undefined 128 0 131 128 0 0 255 1 184 0 0 0 0 0 0 0 0 40 148 71 78 128 70 244 65 89 136 88 61 1 64 107 251 255 255 255 0 0 128 70 244 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
"""
]
stderr = [""] * 5
retval = [0] * 5
+35
View File
@@ -0,0 +1,35 @@
# -*- coding: utf-8 -*-
import itertools
import system_tests
class PanasonicManometerTag(metaclass=system_tests.CaseMeta):
url = "http://dev.exiv2.org/issues/825"
filenames = [
"$data_path/exiv2-bug825{!s}.exv".format(char)
for char in ["a", "b"]
]
commands = list(itertools.chain(
*([
"$exiv2 -pv --grep mano/i " + filename,
"$exiv2 -pa --grep mano/i " + filename
] for filename in filenames)
))
stdout = [
"""0x0086 Panasonic ManometerPressure Short 1 65535
""",
"""Exif.Panasonic.ManometerPressure Short 1 infinite
""",
"""0x0086 Panasonic ManometerPressure Short 1 1007
""",
"""Exif.Panasonic.ManometerPressure Short 1 1007 hPa
"""
]
stderr = [""] * 4
retval = [0] * 4
+5 -1
View File
@@ -4,16 +4,19 @@ timeout: 1
[ENV]
exiv2_path: EXIV2_PATH
binary_extension: EXIV2_EXT
cat: EXIV2_CAT
[ENV fallback]
exiv2_path: ../build/bin
cat: cat
[paths]
exiv2: ${ENV:exiv2_path}/exiv2${ENV:binary_extension}
exiv2json: ${ENV:exiv2_path}/exiv2json${ENV:binary_extension}
data_path: ../test/data
tiff_test: ${ENV:exiv2_path}/tiff-test${ENV:binary_extension}
largeiptc_test: ${ENV:exiv2_path}/largeiptc-test${ENV:binary_extension}
easyaccess_test: ${ENV:exiv2_path}/easyaccess-test${ENV:binary_extension}
[variables]
kerFailedToReadImageData: Failed to read image data
@@ -26,3 +29,4 @@ addition_overflow_message: Overflow in addition
exiv2_exception_message: Exiv2 exception in print action for file
exiv2_overflow_exception_message: std::overflow_error exception in print action for file
exception_in_extract: Exiv2 exception in extract action for file
cat: ${ENV:cat}
+9 -2
View File
@@ -13,6 +13,9 @@ import unittest
if sys.platform == 'win32':
#: invoke subprocess.Popen with shell=True on Windows
_SUBPROCESS_SHELL = True
def _cmd_splitter(cmd):
return cmd
@@ -20,6 +23,9 @@ if sys.platform == 'win32':
return output.replace('\r\n', '\n')
else:
#: invoke subprocess.Popen with shell=False on Unix
_SUBPROCESS_SHELL = False
def _cmd_splitter(cmd):
return shlex.split(cmd)
@@ -503,7 +509,8 @@ def test_run(self):
_cmd_splitter(command),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=self.work_dir
cwd=self.work_dir,
shell=_SUBPROCESS_SHELL
)
def timeout_reached(timeout):
@@ -547,8 +554,8 @@ def test_run(self):
)
self.assertFalse(timeout["flag"], msg="Timeout reached")
self.compare_stdout(i, command, processed_stdout, stdout)
self.compare_stderr(i, command, processed_stderr, stderr)
self.compare_stdout(i, command, processed_stdout, stdout)
self.assertEqual(
retval, proc.returncode, msg="Return value does not match"
)