Merged revisions 521:529 from branches/Exiv2-0_6_041212, added modify-test.sh and related test data
This commit is contained in:
+2
-2
@@ -15,8 +15,8 @@ SHELL = /bin/sh
|
||||
.PHONY: all test clean distclean maintainer-clean
|
||||
|
||||
# Add test drivers to this list
|
||||
TESTS = addmoddel.sh exifdata-test.sh exiv2-test.sh ifd-test.sh \
|
||||
imagetest.sh iotest.sh iptctest.sh makernote-test.sh write-test.sh \
|
||||
TESTS = addmoddel.sh exifdata-test.sh exiv2-test.sh ifd-test.sh imagetest.sh \
|
||||
iotest.sh iptctest.sh makernote-test.sh modify-test.sh write-test.sh \
|
||||
write2-test.sh
|
||||
|
||||
test:
|
||||
|
||||
@@ -3,7 +3,7 @@ tmp/
|
||||
|
||||
Exiv2 version ------------------------------------------------------------
|
||||
../../src/exiv2
|
||||
Exiv2 0.6.1, Copyright (C) 2004, 2005 Andreas Huggel.
|
||||
Exiv2 0.6.2, Copyright (C) 2004, 2005 Andreas Huggel.
|
||||
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
File 1/1: exiv2-empty.jpg
|
||||
Add Iptc.Application2.Credit "mee too! (1)" (String)
|
||||
Add Iptc.Application2.Credit "mee too! (2)" (String)
|
||||
Del Iptc.Application2.Headline
|
||||
Add Exif.Image.WhitePoint "32 12 4 5 6" (Short)
|
||||
Set Iptc.Application2.Headline "Headline" (String)
|
||||
Set Exif.Image.DateTime "Zwanzig nach fuenf" (Ascii)
|
||||
Set Exif.Image.Artist "nobody" (Ascii)
|
||||
Set Exif.Image.Artist "Vincent van Gogh" (Ascii)
|
||||
Set Exif.Photo.UserComment "charset=Ascii This is an ASCII Exif comment" (Comment)
|
||||
File 1/1: exiv2-gc.jpg
|
||||
Set Exif.Image.Software "Exiv2 utility!!" (Ascii)
|
||||
File 1/1: exiv2-empty.jpg
|
||||
0x006e Application2 String 12 Credit mee too! (1)
|
||||
0x0069 Application2 String 8 Headline Headline
|
||||
File 1/2: exiv2-empty.jpg
|
||||
0x0132 IFD0 DateTime Zwanzig nach fuenf
|
||||
0x013b IFD0 Artist Vincent van Gogh
|
||||
0x013e IFD0 WhitePoint 32 12 4 5 6
|
||||
0x8769 IFD0 ExifTag 108
|
||||
0x9286 Exif UserComment This is an ASCII Exif comment
|
||||
File 2/2: exiv2-gc.jpg
|
||||
0x010e IFD0 ImageDescription Exif JPEG
|
||||
0x010f IFD0 Make Camera
|
||||
0x0110 IFD0 Model DC-4300
|
||||
0x0112 IFD0 Orientation top, left
|
||||
0x011a IFD0 XResolution 72
|
||||
0x011b IFD0 YResolution 72
|
||||
0x0128 IFD0 ResolutionUnit inch
|
||||
0x0131 IFD0 Software Exiv2 utility!!
|
||||
0x0132 IFD0 DateTime 2004:06:08 16:04:50
|
||||
0x0213 IFD0 YCbCrPositioning Co-sited
|
||||
0x8769 IFD0 ExifTag 6480
|
||||
0x829a Exif ExposureTime 1/95 s
|
||||
0x829d Exif FNumber F9.1
|
||||
0x8822 Exif ExposureProgram Landscape mode
|
||||
0x8827 Exif ISOSpeedRatings 100
|
||||
0x9000 Exif ExifVersion 48 50 49 48
|
||||
0x9003 Exif DateTimeOriginal 2004:06:08 16:04:50
|
||||
0x9004 Exif DateTimeDigitized 2004:06:08 16:04:50
|
||||
0x9101 Exif ComponentsConfiguration YCbCr
|
||||
0x9201 Exif ShutterSpeedValue 6.6
|
||||
0x9202 Exif ApertureValue 6.4
|
||||
0x9204 Exif ExposureBiasValue 0
|
||||
0x9205 Exif MaxApertureValue 3.1
|
||||
0x9207 Exif MeteringMode Matrix
|
||||
0x9208 Exif LightSource Unknown
|
||||
0x9209 Exif Flash No
|
||||
0xa000 Exif FlashpixVersion 48 49 48 48
|
||||
0xa001 Exif ColorSpace sRGB
|
||||
0xa002 Exif PixelXDimension 1600
|
||||
0xa003 Exif PixelYDimension 2400
|
||||
0xa005 Exif InteroperabilityTag 6738
|
||||
0xa300 Exif FileSource Digital still camera
|
||||
0x0001 Iop InteroperabilityIndex R98
|
||||
0x0002 Iop InteroperabilityVersion 48 49 48 48
|
||||
0x0100 IFD1 ImageWidth 133
|
||||
0x0101 IFD1 ImageLength 200
|
||||
0x0103 IFD1 Compression JPEG
|
||||
0x0112 IFD1 Orientation top, left
|
||||
0x0201 IFD1 JPEGInterchangeFormat 0
|
||||
0x0202 IFD1 JPEGInterchangeFormatLength 6144
|
||||
@@ -0,0 +1,14 @@
|
||||
# Commands for Modify unit tests
|
||||
add Iptc.Application2.Credit String "mee too! (1)"
|
||||
add Iptc.Application2.Credit mee too! (2)
|
||||
del Iptc.Application2.Headline
|
||||
|
||||
add Exif.Image.WhitePoint Short 32 12 4 5 6
|
||||
|
||||
set Iptc.Application2.Headline Headline
|
||||
|
||||
set Exif.Image.DateTime Ascii "Zwanzig nach fuenf"
|
||||
set Exif.Image.Artist Ascii nobody
|
||||
set Exif.Image.Artist "Vincent van Gogh"
|
||||
|
||||
set Exif.Photo.UserComment Comment charset=Ascii This is an ASCII Exif comment
|
||||
@@ -0,0 +1 @@
|
||||
set Exif.Image.Software Ascii "Exiv2 utility!!"
|
||||
Executable
+31
@@ -0,0 +1,31 @@
|
||||
#! /bin/sh
|
||||
# Test driver for write unit tests to build Exif metadata from scratch
|
||||
results="./tmp/modify-test.out"
|
||||
good="./data/modify-test.out"
|
||||
diffargs="--strip-trailing-cr"
|
||||
tmpfile=tmp/ttt
|
||||
touch $tmpfile
|
||||
diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
|
||||
if [ $? -ne 0 ] ; then
|
||||
diffargs=""
|
||||
fi
|
||||
(
|
||||
LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
|
||||
binpath="../../src"
|
||||
cp -f ./data/exiv2-empty.jpg ./tmp
|
||||
cp -f ./data/exiv2-gc.jpg ./tmp
|
||||
cd ./tmp
|
||||
$binpath/exiv2 -v -m ../data/modifycmd1.txt exiv2-empty.jpg
|
||||
$binpath/exiv2 -v -m ../data/modifycmd2.txt exiv2-gc.jpg
|
||||
$binpath/exiv2 -v -pi exiv2-empty.jpg
|
||||
$binpath/exiv2 -v -pt exiv2-empty.jpg exiv2-gc.jpg
|
||||
|
||||
) > $results
|
||||
|
||||
diff -q $diffargs $results $good
|
||||
rc=$?
|
||||
if [ $rc -eq 0 ] ; then
|
||||
echo "All testcases passed."
|
||||
else
|
||||
diff $diffargs $results $good
|
||||
fi
|
||||
Reference in New Issue
Block a user