On Canon bodies and lens firmware 1.x, this lens identifies itself using model number 150. Starting with firmware 2.x, this lens now identifies itself using model number 368. Exiv2 was correctly identifying the former but not the latter. This commit also fixes a pre-existing bug in which exiv2 was not correctly disambiguating lenses using model number 368.
20 lines
731 B
Python
20 lines
731 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
import system_tests
|
|
|
|
class Canon_Sigma_18_35_F18_DC_HSM(metaclass=system_tests.CaseMeta):
|
|
url = "https://github.com/Exiv2/exiv2/issues/1368"
|
|
|
|
filename1 = "$data_path/Canon_Sigma_18_35_F18_DC_HSM_firmware_1xx.exv"
|
|
filename2 = "$data_path/Canon_Sigma_18_35_F18_DC_HSM_firmware_2xx.exv"
|
|
commands = ["$exiv2 -pa -K Exif.CanonCs.LensType $filename1",
|
|
"$exiv2 -pa -K Exif.CanonCs.LensType $filename2"]
|
|
stderr = ["", ""]
|
|
stdout = [
|
|
"""Exif.CanonCs.LensType Short 1 Sigma 18-35mm f/1.8 DC HSM | A
|
|
""",
|
|
"""Exif.CanonCs.LensType Short 1 Sigma 18-35mm f/1.8 DC HSM | A
|
|
"""
|
|
]
|
|
retval = [0, 0]
|