Merge branch 'main' into fix_exiv2_-pR

This commit is contained in:
Kevin Backhouse
2021-11-24 12:58:53 +00:00
committed by GitHub
21 changed files with 578 additions and 127 deletions
+58
View File
@@ -0,0 +1,58 @@
# -*- coding: utf-8 -*-
import system_tests
from system_tests import CaseMeta, CopyTmpFiles, path
class TestNikonFl7GroupWithFlash(metaclass=CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/1941"
filename = system_tests.path("$data_path/exiv2-issue1941-1.exv")
commands = ["""$exiv2 --grep NikonFl7 $filename"""]
stderr = [""]
retval = [0]
stdout = ["""Exif.NikonFl7.Version Undefined 4 1.08
Exif.NikonFl7.FlashSource Byte 1 External
Exif.NikonFl7.ExternalFlashFirmware Short 1 5.01 (SB-900)
Exif.NikonFl7.ExternalFlashData1 Byte 1 No external flash zoom override, external flash attached
Exif.NikonFl7.ExternalFlashData2 Byte 1 n/a
Exif.NikonFl7.FlashCompensation SByte 1 0
Exif.NikonFl7.FlashFocalLength Byte 1 n/a
Exif.NikonFl7.RepeatingFlashRate Byte 1 n/a
Exif.NikonFl7.RepeatingFlashCount Byte 1 n/a
Exif.NikonFl7.FlashGNDistance Byte 1 None
Exif.NikonFl7.FlashGroupAControlData Byte 1 Manual
Exif.NikonFl7.FlashGroupBCControlData Byte 1 Off, Off
Exif.NikonFl7.FlashGroupAData Byte 1 4%
Exif.NikonFl7.FlashGroupBData Byte 1 0
Exif.NikonFl7.FlashGroupCData Byte 1 0
"""]
class TestNikonFl7GroupWithoutFlash(metaclass=CaseMeta):
url = "https://github.com/Exiv2/exiv2/issues/1941"
filename = system_tests.path("$data_path/exiv2-bug1014_2.exv")
commands = ["""$exiv2 --grep NikonFl7 $filename"""]
stderr = [""]
retval = [0]
stdout = ["""Exif.NikonFl7.Version Undefined 4 1.07
Exif.NikonFl7.FlashSource Byte 1 None
Exif.NikonFl7.ExternalFlashFirmware Short 1 n/a
Exif.NikonFl7.ExternalFlashData1 Byte 1 No external flash zoom override, external flash not attached
Exif.NikonFl7.ExternalFlashData2 Byte 1 n/a
Exif.NikonFl7.FlashCompensation SByte 1 0
Exif.NikonFl7.FlashFocalLength Byte 1 n/a
Exif.NikonFl7.RepeatingFlashRate Byte 1 n/a
Exif.NikonFl7.RepeatingFlashCount Byte 1 n/a
Exif.NikonFl7.FlashGNDistance Byte 1 None
Exif.NikonFl7.FlashGroupAControlData Byte 1 Off
Exif.NikonFl7.FlashGroupBCControlData Byte 1 Off, Off
Exif.NikonFl7.FlashGroupAData Byte 1 0
Exif.NikonFl7.FlashGroupBData Byte 1 0
Exif.NikonFl7.FlashGroupCData Byte 1 0
"""]
+38
View File
@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
import system_tests
from system_tests import CaseMeta, path
class TestAddModelsForNikonFl3(metaclass=CaseMeta):
"""
Enables NikonFl3 group to be used by more camera models
"""
filename1 = path("$data_path/pr_1994_poc1.jpg")
filename2 = path("$data_path/pr_1994_poc2.jpg")
commands = ["$exiv2 --grep NikonFl3 $filename1",
"$exiv2 --grep NikonFl3 $filename2"
]
stdout = ["""Exif.NikonFl3.Version Undefined 4 1.04
Exif.NikonFl3.FlashSource Byte 1 None
Exif.NikonFl3.ExternalFlashFirmware Short 1 n/a
Exif.NikonFl3.ExternalFlashFlags Byte 1 Fired
Exif.NikonFl3.FlashFocalLength Byte 1 n/a
Exif.NikonFl3.RepeatingFlashRate Byte 1 n/a
Exif.NikonFl3.RepeatingFlashCount Byte 1 n/a
Exif.NikonFl3.FlashGNDistance Byte 1 None
Exif.NikonFl3.FlashColorFilter Byte 1 None
""",
"""Exif.NikonFl3.Version Undefined 4 1.05
Exif.NikonFl3.FlashSource Byte 1 None
Exif.NikonFl3.ExternalFlashFirmware Short 1 n/a
Exif.NikonFl3.ExternalFlashFlags Byte 1 Fired
Exif.NikonFl3.FlashFocalLength Byte 1 n/a
Exif.NikonFl3.RepeatingFlashRate Byte 1 n/a
Exif.NikonFl3.RepeatingFlashCount Byte 1 n/a
Exif.NikonFl3.FlashGNDistance Byte 1 None
Exif.NikonFl3.FlashColorFilter Byte 1 None
"""]
stderr = [""]*2
retval = [0]*2