From 149688076d16b94997b3beabfe2e19de6c356028 Mon Sep 17 00:00:00 2001 From: clanmills Date: Wed, 8 Apr 2020 18:34:48 +0100 Subject: [PATCH] Discussion: https://github.com/Exiv2/exiv2/issues/1004#issuecomment-611064916 --- src/canonmn_int.cpp | 5 ++++- test/functions.source | 8 ++++++-- test/path-test.sh | 6 +++--- test/xmpparser-test.sh | 1 + tests/bugfixes/github/test_issue_20.py | 4 ++-- tests/bugfixes/github/test_issue_45.py | 2 +- 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/canonmn_int.cpp b/src/canonmn_int.cpp index 57d99d79..b3443819 100644 --- a/src/canonmn_int.cpp +++ b/src/canonmn_int.cpp @@ -928,6 +928,7 @@ namespace Exiv2 { { 142, "Canon EF 300mm f/2.8L IS USM" }, { 143, "Canon EF 500mm f/4L IS USM" }, { 143, "Sigma 17-70mm f/2.8-4 DC Macro OS HSM" }, // 1 + { 143, "Sigma 24-105mm F4 DG OS HSM | A" }, // 2 { 144, "Canon EF 35-135mm f/4-5.6 USM" }, { 145, "Canon EF 100-300mm f/4.5-5.6 USM" }, { 146, "Canon EF 70-210mm f/3.5-4.5 USM" }, @@ -1007,6 +1008,7 @@ namespace Exiv2 { { 173, "Sigma 10mm f/2.8 EX DC Fisheye" }, // 3 { 173, "Sigma 15mm f/2.8 EX DG Diagonal Fisheye" }, // 4 { 173, "Venus Laowa 100mm F2.8 2X Ultra Macro APO" }, // 5 + { 173, "Sigma 150-500mm f/5-6.3 APO DG OS HSM + 2x" }, // 6 { 174, "Canon EF 135mm f/2L USM" }, { 174, "Sigma 70-200mm f/2.8 EX DG APO OS HSM" }, // 1 { 174, "Sigma 50-500mm f/4.5-6.3 APO DG OS HSM" }, // 2 @@ -1130,7 +1132,8 @@ namespace Exiv2 { { 252, "Canon EF 70-200mm f/2.8L IS III USM + 1.4x" }, // 1 { 253, "Canon EF 70-200mm f/2.8L IS II USM + 2x" }, { 253, "Canon EF 70-200mm f/2.8L IS III USM + 2x" }, // 1 - { 254, "Canon EF 100mm f/2.8L Macro IS USM" }, + { 254, "Canon EF 100mm f/2.8L Macro IS USM" }, // 1 + { 254, "Tamron SP 90mm f/2.8 Di VC USD Macro 1:1" }, // 2 { 255, "Sigma 24-105mm f/4 DG OS HSM | A" }, { 255, "Sigma 180mm f/2.8 EX DG OS HSM APO Macro" }, // 1 { 368, "Sigma 14-24mm f/2.8 DG HSM | A" }, diff --git a/test/functions.source b/test/functions.source index 40eb08dd..9ea3d4af 100644 --- a/test/functions.source +++ b/test/functions.source @@ -11,7 +11,7 @@ runTest() if [ ! -z $EXIV2_ECHO ]; then echoTest $VALGRIND $bin$prog "$@" fi - $VALGRIND $bin$prog "$@" + $VALGRIND $bin$prog$exe "$@" ) } @@ -37,7 +37,7 @@ existsTest() result=1 fi else - if [ -e $bin$prog -o -e $bin$prog.exe ]; then + if [ -e $bin$prog -o -e $bin$prog$exe ]; then result=1 fi fi @@ -464,6 +464,10 @@ prepareTest() if [ "$PLATFORM" == cygwin -o "$PLATFORM" == mingw ]; then exe=.exe fi + + if [ !-z $EXIV2_EXT ]; then + exe=$EXIV2_EXT + fi if [ "$PLATFORM" == cygwin ]; then # We need a private version of diff for linux compatibility diff --git a/test/path-test.sh b/test/path-test.sh index c7e03a82..8d9ac192 100755 --- a/test/path-test.sh +++ b/test/path-test.sh @@ -4,13 +4,13 @@ source ./functions.source ( cd "$testdir" - if [ $(existsTest path-test) == 1 ] ; then + if [ $(existsTest pathtest) == 1 ] ; then copyTestFile path-test.txt - runTest path-test path-test.txt + runTest pathtest path-test.txt else echo "$0: path-test executable not found. Skipping path tests." fi ) # That's all Folks! -## \ No newline at end of file +## diff --git a/test/xmpparser-test.sh b/test/xmpparser-test.sh index db9c7933..94981d72 100755 --- a/test/xmpparser-test.sh +++ b/test/xmpparser-test.sh @@ -17,6 +17,7 @@ fi for f in ${files[@]} ; do runTest xmpparser-test $f + # unix2dos -q ${f}-new diff $f ${f}-new done diff --git a/tests/bugfixes/github/test_issue_20.py b/tests/bugfixes/github/test_issue_20.py index 1733dc02..2bf20782 100644 --- a/tests/bugfixes/github/test_issue_20.py +++ b/tests/bugfixes/github/test_issue_20.py @@ -5,7 +5,7 @@ import system_tests class TamronSupport(metaclass=system_tests.CaseMeta): - description = "Added support for 'Tamron SP 15-30mm f/2.8 Di VC USD A012' and 'Tamron SP 90mm f/2.8 Di VC USD MACRO1:1'" + description = "Added support for 'Tamron SP 15-30mm f/2.8 Di VC USD' and 'Tamron SP 90mm f/2.8 Di VC USD MACRO1:1'" files = [ "exiv2-g20.exv", @@ -36,7 +36,7 @@ Exif.Photo.LensSerialNumber Ascii 12 0000000000 """, # TamronSP15-30mmF2.8DiVCUSDA012.exv" - """Exif.CanonCs.LensType Short 1 Tamron SP 15-30mm f/2.8 Di VC USD A012 + """Exif.CanonCs.LensType Short 1 Tamron SP 15-30mm f/2.8 Di VC USD """, # TamronSP90mmF2.8DiVCUSDMacroF004.exv diff --git a/tests/bugfixes/github/test_issue_45.py b/tests/bugfixes/github/test_issue_45.py index 16727b26..ca7ca1d4 100644 --- a/tests/bugfixes/github/test_issue_45.py +++ b/tests/bugfixes/github/test_issue_45.py @@ -9,7 +9,7 @@ class Sigma24_105mmRecognization(metaclass=system_tests.CaseMeta): filename = "$data_path/exiv2-g45.exv" commands = ["$exiv2 -pa --grep lens/i " + filename] - stdout = ["""Exif.CanonCs.LensType Short 1 Sigma 24-105mm F4 DG OS HSM [Art 013] + stdout = ["""Exif.CanonCs.LensType Short 1 Sigma 24-105mm F4 DG OS HSM | A Exif.CanonCs.Lens Short 3 24.0 - 105.0 mm Exif.CanonCf.LensAFStopButton Short 1 0 Exif.Canon.LensModel Ascii 74 24-105mm F4 DG OS HSM | Art 013