From df63ad1e78dac46b5c250f822fa39d6aed756308 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Mon, 24 Aug 2015 11:18:45 +0000 Subject: [PATCH] #935: Added a test-case and updated existing tests for the improved ExposureTime pretty-print function. --- test/bugfixes-test.sh | 21 +++++++++++++++++++++ test/data/bugfixes-test.out | Bin 1838574 -> 1839860 bytes test/data/exiv2-test.out | 12 ++++++------ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh index f79407de..4dd42fba 100755 --- a/test/bugfixes-test.sh +++ b/test/bugfixes-test.sh @@ -279,6 +279,27 @@ source ./functions.source runTest exiv2 -pS $filename done + num=935 + filename=`prep_empty_file $num` + runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 605/10" $filename + runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 2/3" $filename + runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 0/0" $filename + runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 605/605" $filename + runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime 100/1500" $filename + runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -v -M"set Exif.Photo.ExposureTime Ascii Test" $filename + runTest exiv2 -u -pv -gExif.Photo.ExposureTime $filename + runTest exiv2 -u -pa -gExif.Photo.ExposureTime $filename + num=937 filename=exiv2-bug$num.jpg printf "$num " >&3 diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out index 3b0a94f25f57ecc658e754db348087296058dff5..1cecc76ae5e315b1f26ad5b4fa193f23fd8778b5 100644 GIT binary patch delta 656 zcmaDiyWq>xf(`GvSPk?H42-7NsxvxFmgN=S?9Kh#fl1G(+0Ccj&4&?)nShuXh*^M` z6^Pk@m>q~YfS41Axqz4(h-A*fLIWSg@9NXh(&-{6o|!uSR9BYfLIcU zrMA2INQYZ8nohrH%_z%kX>2+@@s6~}jydwqJp*nzO+Ors93rJ<9kksN5per4VlQT2%MT~+x54)*? a0!TT~IK9b0J|~c`0TR&M-q$Lf&;bDD&b-k8 delta 141 zcmeyewBX(Bf(`GvCeKxLoh-{MzS*1mw?ngsPrHW?BM>tIF*6Xe05K~NvjH(X5OV-A zClGT1F*gwN05LBR^8qnG5DNgYAP@@yu`m#e0I?_#ivh7X5K92DBoIq&_wbPpx7@zC IOFFOv0E_i5TmS$7 diff --git a/test/data/exiv2-test.out b/test/data/exiv2-test.out index a89ce4f5..2e1e1e0d 100644 --- a/test/data/exiv2-test.out +++ b/test/data/exiv2-test.out @@ -261,7 +261,7 @@ File 3/15: 20000506_020544.jpg 20000506_020544.jpg Camera model : E990 20000506_020544.jpg Image timestamp : 2000:05:06 02:05:44 20000506_020544.jpg Image number : -20000506_020544.jpg Exposure time : 1/89 s +20000506_020544.jpg Exposure time : 0.0111982 s 20000506_020544.jpg Aperture : F7 20000506_020544.jpg Exposure bias : 0 EV 20000506_020544.jpg Flash : No flash @@ -746,7 +746,7 @@ File 3/15: 20000506_020544.jpg 20000506_020544.jpg Exif.Image.DateTime Ascii 20 2000:05:06 02:05:44 20000506_020544.jpg Exif.Image.YCbCrPositioning Short 1 Co-sited 20000506_020544.jpg Exif.Image.ExifTag Long 1 284 -20000506_020544.jpg Exif.Photo.ExposureTime Rational 1 1/89 s +20000506_020544.jpg Exif.Photo.ExposureTime Rational 1 0.0111982 s 20000506_020544.jpg Exif.Photo.FNumber Rational 1 F7 20000506_020544.jpg Exif.Photo.ExposureProgram Short 1 Aperture priority 20000506_020544.jpg Exif.Photo.ISOSpeedRatings Short 1 100 @@ -2359,7 +2359,7 @@ Compare image data and extracted data ------------------------------------ < 20000506_020544.jpg Exif.Image.DateTime Ascii 20 2000:05:06 02:05:44 < 20000506_020544.jpg Exif.Image.YCbCrPositioning Short 1 Co-sited < 20000506_020544.jpg Exif.Image.ExifTag Long 1 284 -< 20000506_020544.jpg Exif.Photo.ExposureTime Rational 1 1/89 s +< 20000506_020544.jpg Exif.Photo.ExposureTime Rational 1 0.0111982 s < 20000506_020544.jpg Exif.Photo.FNumber Rational 1 F7 < 20000506_020544.jpg Exif.Photo.ExposureProgram Short 1 Aperture priority < 20000506_020544.jpg Exif.Photo.ISOSpeedRatings Short 1 100 @@ -3900,7 +3900,7 @@ Compare image data and extracted data ------------------------------------ > 20000506_020544.exv Exif.Image.DateTime Ascii 20 2000:05:06 02:05:44 > 20000506_020544.exv Exif.Image.YCbCrPositioning Short 1 Co-sited > 20000506_020544.exv Exif.Image.ExifTag Long 1 216 -> 20000506_020544.exv Exif.Photo.ExposureTime Rational 1 1/89 s +> 20000506_020544.exv Exif.Photo.ExposureTime Rational 1 0.0111982 s > 20000506_020544.exv Exif.Photo.FNumber Rational 1 F7 > 20000506_020544.exv Exif.Photo.ExposureProgram Short 1 Aperture priority > 20000506_020544.exv Exif.Photo.ISOSpeedRatings Short 1 100 @@ -5661,7 +5661,7 @@ Compare original and inserted image data --------------------------------- < 20000506_020544.jpg Exif.Image.DateTime Ascii 20 2000:05:06 02:05:44 < 20000506_020544.jpg Exif.Image.YCbCrPositioning Short 1 Co-sited < 20000506_020544.jpg Exif.Image.ExifTag Long 1 284 -< 20000506_020544.jpg Exif.Photo.ExposureTime Rational 1 1/89 s +< 20000506_020544.jpg Exif.Photo.ExposureTime Rational 1 0.0111982 s < 20000506_020544.jpg Exif.Photo.FNumber Rational 1 F7 < 20000506_020544.jpg Exif.Photo.ExposureProgram Short 1 Aperture priority < 20000506_020544.jpg Exif.Photo.ISOSpeedRatings Short 1 100 @@ -7202,7 +7202,7 @@ Compare original and inserted image data --------------------------------- > 20000506_020544.exv Exif.Image.DateTime Ascii 20 2000:05:06 02:05:44 > 20000506_020544.exv Exif.Image.YCbCrPositioning Short 1 Co-sited > 20000506_020544.exv Exif.Image.ExifTag Long 1 216 -> 20000506_020544.exv Exif.Photo.ExposureTime Rational 1 1/89 s +> 20000506_020544.exv Exif.Photo.ExposureTime Rational 1 0.0111982 s > 20000506_020544.exv Exif.Photo.FNumber Rational 1 F7 > 20000506_020544.exv Exif.Photo.ExposureProgram Short 1 Aperture priority > 20000506_020544.exv Exif.Photo.ISOSpeedRatings Short 1 100