From e11900847e80975a1fb33dbd82d9c94a3cf74147 Mon Sep 17 00:00:00 2001 From: Robin Mills Date: Mon, 25 May 2020 14:19:16 +0100 Subject: [PATCH] More cleanup. --- test/crw-test.sh | 10 ++-------- test/data/crw-test.out | 3 +-- test/functions.source | 14 ++------------ test/geotag-test.sh | 8 +------- test/icc-test.sh | 8 +------- test/stdin-test.sh | 6 +----- test/webp-test.sh | 8 +------- test/xmpparser-test.sh | 6 +----- 8 files changed, 10 insertions(+), 53 deletions(-) diff --git a/test/crw-test.sh b/test/crw-test.sh index 5ad628e6..6b329bd7 100755 --- a/test/crw-test.sh +++ b/test/crw-test.sh @@ -14,7 +14,7 @@ source ./functions.source echo set Exif.Canon.SerialNumber 1 echo add Exif.Canon.SerialNumber 2 echo set Exif.Photo.ISOSpeedRatings 155 - echo set Exif.Photo.DateTimeOriginal 2007:11:11 09:10:11 + # echo set Exif.Photo.DateTimeOriginal 2007:11:11 09:10:11 # See #1219 ) > $cmdfile copyTestFile $crwfile @@ -31,13 +31,7 @@ source ./functions.source ) 3>&1 > $results -printf "\n" - -# ---------------------------------------------------------------------- -# Evaluate results -cat $results | tr -d $'\r' > $results-stripped -mv $results-stripped $results -reportTest $results $good +reportTest # That's all Folks! ## diff --git a/test/data/crw-test.out b/test/data/crw-test.out index 9cdf5f09..892c50d3 100644 --- a/test/data/crw-test.out +++ b/test/data/crw-test.out @@ -72,7 +72,6 @@ Set Exif.Canon.FirmwareVersion "Whatever version" (Ascii) Set Exif.Canon.SerialNumber "1" (Long) Add Exif.Canon.SerialNumber "2" (Long) Set Exif.Photo.ISOSpeedRatings "155" (Short) -Set Exif.Photo.DateTimeOriginal "2007:11:11 09:10:11" (Ascii) File 1/1: exiv2-canon-powershot-s40.crw Exif.Thumbnail.Compression Short 1 JPEG (old-style) Exif.Thumbnail.JPEGInterchangeFormat Long 1 0 @@ -81,7 +80,7 @@ Exif.Photo.PixelXDimension Long 1 2272 Exif.Photo.PixelYDimension Long 1 1704 Exif.Image.Orientation Short 1 top, left Exif.Canon.FileNumber Long 1 130-3050 -Exif.Photo.DateTimeOriginal Ascii 20 2007:11:11 09:10:11 +Exif.Photo.DateTimeOriginal Ascii 20 2005:04:23 17:54:36 Exif.Canon.ImageType Ascii 30 CRW:High definition CCD image Exif.Canon.OwnerName Ascii 16 Different owner Exif.Image.Make Ascii 6 Canon diff --git a/test/functions.source b/test/functions.source index ae23c6dd..e1f0985a 100644 --- a/test/functions.source +++ b/test/functions.source @@ -85,10 +85,7 @@ copyTestFiles() reportTest() { cat $results | tr '\\' '/' > ${results}-new - mv -f ${results}-new $results - if [ ! -z `which dos2unix` ]; then - dos2unix $results >/dev/null 2>&1 - fi + mv -f ${results}-new $results if [ $# -eq 0 ]; then lhs=$results @@ -104,17 +101,10 @@ reportTest() fi fi - if [ "$PLATFORM" == "cygwin" ]; then - diff $diffargs $(cygpath -aw $lhs) $(cygpath -aw $rhs) - else - diff $diffargs $lhs $rhs - fi + diff $diffargs $lhs $rhs rc=$? if [ $rc -eq 0 ] ; then echo "all testcases passed." - else - diff $diffargs $lhs $rhs - exit 3 fi } diff --git a/test/geotag-test.sh b/test/geotag-test.sh index f16923f7..0942699a 100755 --- a/test/geotag-test.sh +++ b/test/geotag-test.sh @@ -24,13 +24,7 @@ source ./functions.source ) 3>&1 > $results 2>&1 -printf "\n" - -# ---------------------------------------------------------------------- -# Evaluate results -cat $results | tr -d $'\r' > $results-stripped -mv $results-stripped $results -reportTest $results $good +reportTest # That's all Folks! ## diff --git a/test/icc-test.sh b/test/icc-test.sh index 32610e8a..f2492127 100755 --- a/test/icc-test.sh +++ b/test/icc-test.sh @@ -57,13 +57,7 @@ test1120() # --comment and -dc clobbered by writing ICC/JPG ) 3>&1 > $results 2>&1 -printf "\n" - -# ---------------------------------------------------------------------- -# Evaluate results -cat $results | tr -d $'\r' > $results-stripped -mv $results-stripped $results -reportTest $results $good +reportTest # That's all Folks! ## diff --git a/test/stdin-test.sh b/test/stdin-test.sh index 489b52c2..8b6f7bf9 100755 --- a/test/stdin-test.sh +++ b/test/stdin-test.sh @@ -49,11 +49,7 @@ source ./functions.source printf "\n" -# ---------------------------------------------------------------------- -# Evaluate results -cat $results | tr -d $'\r' > $results-stripped -mv $results-stripped $results -reportTest $results $good +reportTest # That's all Folks! ## diff --git a/test/webp-test.sh b/test/webp-test.sh index ec66485d..53455ccd 100755 --- a/test/webp-test.sh +++ b/test/webp-test.sh @@ -80,13 +80,7 @@ source ./functions.source ) 3>&1 > $results 2>&1 -printf "\n" - -# ---------------------------------------------------------------------- -# Evaluate results -cat $results | tr -d $'\r' > $results-stripped -mv $results-stripped $results -reportTest $results $good +reportTest # That's all Folks! ## diff --git a/test/xmpparser-test.sh b/test/xmpparser-test.sh index f1911e3c..7ec70e2b 100755 --- a/test/xmpparser-test.sh +++ b/test/xmpparser-test.sh @@ -41,11 +41,7 @@ fi ) > $results 2>&1 -# ---------------------------------------------------------------------- -# Evaluate results -cat $results | tr -d $'\r' > $results-stripped -mv $results-stripped $results -reportTest $results $good +reportTest # That's all Folks! ##