[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a
Maximiliano Curia
maxy at moszumanska.debian.org
Thu Jul 13 17:43:31 UTC 2017
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=c68b202
The following commit has been merged in the master branch:
commit c68b2024f972f96720eb9d278a47392b9bf00515
Author: Robin Mills <robin at clanmills.com>
Date: Sun Nov 4 19:51:59 2012 +0000
Issue: #850. test scripts refactored. Common code collected into functions.source. Thanks to Shawn for his contribution.
---
Makefile | 3 +-
samples/Makefile | 3 -
test/addmoddel.sh | 36 ++--
test/bugfixes-test.sh | 475 +++++++++++++++++++++++--------------------------
test/conversions.sh | 198 ++++++++++-----------
test/eps-test.sh | 33 ++--
test/exifdata-test.sh | 42 ++---
test/exiv2-test.sh | 151 ++++++----------
test/functions.source | 273 ++++++++++++++++++++++++++++
test/imagetest.sh | 83 +--------
test/iotest.sh | 14 +-
test/iptctest.sh | 32 ++--
test/modify-test.sh | 44 ++---
test/path-test.sh | 17 +-
test/preview-test.sh | 18 +-
test/stringto-test.sh | 33 +---
test/testMSVC.sh | 5 +-
test/tiff-test.sh | 33 +---
test/verifyMSVC.sh | 2 +-
test/video-test.sh | 49 ++---
test/write-test.sh | 77 +++-----
test/write2-test.sh | 33 +---
test/xmpparser-test.sh | 78 +++-----
23 files changed, 839 insertions(+), 893 deletions(-)
diff --git a/Makefile b/Makefile
index e60408d..d5335db 100644
--- a/Makefile
+++ b/Makefile
@@ -98,7 +98,8 @@ mostlyclean clean: config/config.mk
# for packaging.
distclean: clean
rm -f config.log config.status libtool
- rm -f *~ *.bak *#
+ rm -f *~ *.bak
+ rm -rf bin
# This removes almost everything, including the configure script!
maintainer-clean: distclean
diff --git a/samples/Makefile b/samples/Makefile
index b41163a..27a67e6 100644
--- a/samples/Makefile
+++ b/samples/Makefile
@@ -60,16 +60,13 @@ BINSRC = addmoddel.cpp \
exifcomment.cpp \
exifdata-test.cpp \
exifprint.cpp \
- geotag.cpp \
iotest.cpp \
iptceasy.cpp \
iptcprint.cpp \
iptctest.cpp \
key-test.cpp \
largeiptc-test.cpp \
- metacopy.cpp \
mmap-test.cpp \
- path-test.cpp \
prevtest.cpp \
stringto-test.cpp \
taglist.cpp \
diff --git a/test/addmoddel.sh b/test/addmoddel.sh
index 481697f..c15a130 100755
--- a/test/addmoddel.sh
+++ b/test/addmoddel.sh
@@ -1,30 +1,14 @@
-#! /bin/sh
+#!/bin/bash
# Test driver to run the addmoddel sample program
-results="./tmp/addmoddel.out"
-good="./data/addmoddel.out"
-diffargs="--strip-trailing-cr"
-tmpfile=tmp/ttt
-touch $tmpfile
-diff -q $diffargs $tmpfile $tmpfile 2>/dev/null
-if [ $? -ne 0 ] ; then
- diffargs=""
-fi
+source ./functions.source
+
(
-if [ -z "$EXIV2_BINDIR" ] ; then
- bin="$VALGRIND ../../bin"
-else
- bin="$VALGRIND $EXIV2_BINDIR"
-fi
-cp -f ./data/exiv2-empty.jpg ./tmp
-cd ./tmp
-$bin/addmoddel exiv2-empty.jpg
-$bin/exiv2 -pv exiv2-empty.jpg
+ copyTestFile exiv2-empty.jpg
+ runTest addmoddel exiv2-empty.jpg
+ runTest exiv2 -pv exiv2-empty.jpg
) > $results
-diff -q $diffargs $results $good
-rc=$?
-if [ $rc -eq 0 ] ; then
- echo "All testcases passed."
-else
- diff $diffargs $results $good
-fi
+reportTest
+
+# That's all Folks!
+##
\ No newline at end of file
diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh
index 601473e..16f4000 100755
--- a/test/bugfixes-test.sh
+++ b/test/bugfixes-test.sh
@@ -1,257 +1,233 @@
-#! /bin/sh
+#!/bin/bash
# Test driver with regression tests for bugfixes
-export LC_ALL=C
-results="./tmp/bugfixes-test.out"
-good="./data/bugfixes-test.out"
-
-prep_file()
-{
- echo `prep_any_file $1 exiv2-bug$1.jpg`
-}
-
-prep_empty_file()
-{
- echo `prep_any_file $1 exiv2-empty.jpg`
-}
-
-prep_any_file()
-{
- printf "$1 " >&3
- echo '------>' Bug $1 '<-------' >&2
- cp -f ../data/$2 exiv2-bug$1.jpg
- echo exiv2-bug$1.jpg
-}
+
+source ./functions.source
(
-if [ -z "$EXIV2_BINDIR" ] ; then
- bin="$VALGRIND ../../bin"
-else
- bin="$VALGRIND $EXIV2_BINDIR"
-fi
-cd ./tmp
-
-num=426
-filename=`prep_file $num`
-$bin/exiv2 -u -pi $filename
-
-num=440
-filename=`prep_file $num`
-$bin/exiv2 -u -pi $filename
-
-num=443
-filename=`prep_file $num`
-$bin/exiv2 -u -b -pt $filename
-
-num=444
-filename=`prep_file $num`
-$bin/exiv2 -u -pi $filename
-
-num=445
-filename=`prep_file $num`
-$bin/exiv2 -u -v -M'set Exif.Photo.UserComment A comment' $filename
-$bin/exiv2 -u -b -pt $filename
-filename=exiv2-empty.jpg
-cp -f ../data/$filename .
-$bin/exiv2 -u -v -M'set Exif.Photo.UserComment A comment' $filename
-$bin/exiv2 -u -b -pt $filename
-
-num=447 # Problem only visible in Valgrind
-filename=`prep_file $num`
-$bin/exiv2 -u -pi $filename
-
-num=452
-filename=`prep_empty_file $num`
-$bin/exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude SRational -1/3 -2/3 -3/3" $filename
-$bin/exiv2 -u -pv $filename
-$bin/exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude Rational 1/3 2/3 3/3" $filename
-$bin/exiv2 -u -pv $filename
-
-num=460
-filename=`prep_file $num`
-$bin/exiv2 -u -pt $filename
-
-num=479
-filename=`prep_file $num`
-$bin/exiv2 -u -pt $filename
-
-num=480
-filename=`prep_file $num`
-$bin/largeiptc-test $filename ../data/imagemagick.png
-
-num=495
-filename=`prep_file $num`
-$bin/exiv2 -u -pi $filename
-
-num=498
-filename=`prep_empty_file $num`
-$bin/exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude 0/1 1/1 2/1" $filename
-$bin/exiv2 -u -v -pv $filename
-$bin/exiv2 -u -v -M"del Exif.GPSInfo.GPSLatitude" $filename
-$bin/exiv2 -u -v -pv $filename
-
-num=501
-filename=`prep_file $num`
-$bin/exiv2 -u -pi $filename
-
-num=528
-filename=`prep_file $num`
-$bin/exiv2 -u -pt $filename
-$bin/exiv2 -u -v -M"set Exif.Image.Software GI" $filename
-
-num=540
-filename=`prep_file $num`
-$bin/exiv2 -u -px $filename
-
-num=554
-filename=`prep_empty_file $num`
-$bin/exiv2 -u -v -M"set Exif.Image.DateTime Date 2007-05-27" $filename
-$bin/exiv2 -u -pt $filename
-
-num=662
-filename=`prep_empty_file $num`
-
-$bin/exiv2 -u -M"set Exif.Photo.UserComment charset=Ascii An ascii comment" $filename
-$bin/exiv2 -u -PEnh $filename
-
-$bin/exiv2 -u -M"set Exif.Photo.UserComment charset=Ascii A\nnewline" $filename
-$bin/exiv2 -u -PEnh $filename
-
-$bin/exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode A Unicode comment" $filename
-$bin/exiv2 -u -PEnh $filename
-
-$bin/exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode \u01c4" $filename
-$bin/exiv2 -u -PEnh $filename
-
-$bin/exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode A\u01c4C" $filename
-$bin/exiv2 -u -PEnh $filename
-
-$bin/exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode With\nNewline" $filename
-$bin/exiv2 -u -PEnh $filename
-
-$bin/exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode With\tTab" $filename
-$bin/exiv2 -u -PEnh $filename
-
-# Test invalid escape sequences
-$bin/exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode \ugggg" $filename
-$bin/exiv2 -u -PEnh $filename
-
-num=666
-filename=`prep_empty_file $num`
+ cd ./tmp
+
+ num=426
+ filename=`prep_file $num`
+ runTest exiv2 -u -pi $filename
+
+ num=440
+ filename=`prep_file $num`
+ runTest exiv2 -u -pi $filename
+
+ num=443
+ filename=`prep_file $num`
+ runTest exiv2 -u -b -pt $filename
+
+ num=444
+ filename=`prep_file $num`
+ runTest exiv2 -u -pi $filename
+
+ num=445
+ filename=`prep_file $num`
+ runTest exiv2 -u -v -M'set Exif.Photo.UserComment A comment' $filename
+ runTest exiv2 -u -b -pt $filename
+ filename=exiv2-empty.jpg
+ copyTestFile $filename
+ runTest exiv2 -u -v -M'set Exif.Photo.UserComment A comment' $filename
+ runTest exiv2 -u -b -pt $filename
+
+ num=447 # Problem only visible in Valgrind
+ filename=`prep_file $num`
+ runTest exiv2 -u -pi $filename
+
+ num=452
+ filename=`prep_empty_file $num`
+ runTest exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude SRational -1/3 -2/3 -3/3" $filename
+ runTest exiv2 -u -pv $filename
+ runTest exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude Rational 1/3 2/3 3/3" $filename
+ runTest exiv2 -u -pv $filename
+
+ num=460
+ filename=`prep_file $num`
+ runTest exiv2 -u -pt $filename
+
+ num=479
+ filename=`prep_file $num`
+ runTest exiv2 -u -pt $filename
+
+ num=480
+ filename=`prep_file $num`
+ runTest largeiptc-test $filename ../data/imagemagick.png
+
+ num=495
+ filename=`prep_file $num`
+ runTest exiv2 -u -pi $filename
+
+ num=498
+ filename=`prep_empty_file $num`
+ runTest exiv2 -u -v -M"set Exif.GPSInfo.GPSLatitude 0/1 1/1 2/1" $filename
+ runTest exiv2 -u -v -pv $filename
+ runTest exiv2 -u -v -M"del Exif.GPSInfo.GPSLatitude" $filename
+ runTest exiv2 -u -v -pv $filename
+
+ num=501
+ filename=`prep_file $num`
+ runTest exiv2 -u -pi $filename
-$bin/exiv2 -u -v -M'set Exif.Image.Make NIKON' \
+ num=528
+ filename=`prep_file $num`
+ runTest exiv2 -u -pt $filename
+ runTest exiv2 -u -v -M"set Exif.Image.Software GI" $filename
+
+ num=540
+ filename=`prep_file $num`
+ runTest exiv2 -u -px $filename
+
+ num=554
+ filename=`prep_empty_file $num`
+ runTest exiv2 -u -v -M"set Exif.Image.DateTime Date 2007-05-27" $filename
+ runTest exiv2 -u -pt $filename
+
+ num=662
+ filename=`prep_empty_file $num`
+
+ runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Ascii An ascii comment" $filename
+ runTest exiv2 -u -PEnh $filename
+
+ runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Ascii A\nnewline" $filename
+ runTest exiv2 -u -PEnh $filename
+
+ runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode A Unicode comment" $filename
+ runTest exiv2 -u -PEnh $filename
+
+ runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode \u01c4" $filename
+ runTest exiv2 -u -PEnh $filename
+
+ runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode A\u01c4C" $filename
+ runTest exiv2 -u -PEnh $filename
+
+ runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode With\nNewline" $filename
+ runTest exiv2 -u -PEnh $filename
+
+ runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode With\tTab" $filename
+ runTest exiv2 -u -PEnh $filename
+
+ # Test invalid escape sequences
+ runTest exiv2 -u -M"set Exif.Photo.UserComment charset=Unicode \ugggg" $filename
+ runTest exiv2 -u -PEnh $filename
+
+ num=666
+ filename=`prep_empty_file $num`
+
+ runTest exiv2 -u -v -M'set Exif.Image.Make NIKON' \
-M'set Exif.Image.Model D90' \
-M'set Exif.Nikon3.ShutterCount 100' \
-M'set Exif.Nikon3.SerialNumber 123' \
-M'set Exif.NikonSi02xx.Version 48 50 51 52' \
-M'set Exif.NikonSi02xx.ShutterCount 100' $filename
-$bin/exiv2 -u -pa -u -b $filename
-
-num=683
-filename=`prep_any_file $num exiv2-nikon-d70.jpg`
-rm -f 2004-03-30-Tue-090.jpg
-$bin/exiv2 -u -f -r %Y-%m-%d-%a-%j $filename
-ls 2004-03-30-Tue-090.jpg
-
-num=711
-printf "$num " >&3
-# Little endian (II)
-filename=exiv2-bug${num}-1.jpg
-cp -f ../data/exiv2-empty.jpg $filename
-echo '------>' Bug $num '<-------' >&2
-$bin/exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Initial values, read from the command line' \
- -M'set Exif.Image.DocumentName Float 0.12345' \
- -M'set Exif.Image.ImageDescription Double 0.987654321' $filename
-$bin/exiv2 -u -v -PEkyct $filename
-$bin/exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Non-intrusive update' $filename
-$bin/exiv2 -u -v -PEkyct $filename
-$bin/exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch' $filename
-$bin/exiv2 -u -v -PEkyct $filename
-# Big endian (MM)
-filename=exiv2-bug${num}-2.jpg
-cp -f ../data/exiv2-kodak-dc210.jpg $filename
-$bin/exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Initial values, read from the command line' \
- -M'set Exif.Image.DocumentName Float 0.12345' \
- -M'set Exif.Image.ImageDescription Double 0.987654321' $filename
-$bin/exiv2 -u -v -PEkyct $filename
-$bin/exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Non-intrusive update' $filename
-$bin/exiv2 -u -v -PEkyct $filename
-$bin/exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch' $filename
-$bin/exiv2 -u -v -PEkyct $filename
-
-# Test easy-access keys (using a dummy bug number)
-if { test -f $bin/easyaccess-test || test -f $bin/easyaccess-test.exe; }; then
- num=726
- filename=`prep_empty_file $num`
- $bin/exiv2 -u -v -M"set Exif.Image.Make Samsung" $filename
- $bin/easyaccess-test $filename
-else
- echo "bugfixes-test.sh: easyaccess-test executable not found. Skipping regression test for issue #726."
-fi
-
-# Test 'migration of XMP namespaces' (see #751 and related forum post)
-num=751
-filename=`prep_empty_file $num`
-xmpname=exiv2-bug$num.xmp
-$bin/exiv2 -v -M'reg imageapp orig/' -M 'set Xmp.imageapp.uuid abcd' $filename
-$bin/exiv2 -f -eX $filename
-cat $xmpname
-$bin/exiv2 -v -M'reg imageapp dest/' -M 'set Xmp.imageapp.uuid abcd' $filename
-$bin/exiv2 -f -eX $filename
-cat $xmpname
-
-num=769
-filename=`prep_empty_file $num`
-$bin/exiv2 -u -v -M"add Exif.Image.Make Canon" -M"add Exif.CanonCs.0x0001 Short 1" -M"add Exif.CanonCs.0x0000 Short 2" $filename
-$bin/exiv2 -u -v -PEkyct $filename
-
-num=799
-filename=`prep_empty_file $num`
-$bin/exiv2 -v -m ../data/bug$num.cmd $filename
-$bin/exiv2 -v -pa $filename
-$bin/exiv2 -f -eX $filename
-cat exiv2-bug$num.xmp
-
-num=800
-printf "$num " >&3
-for type in 8BIM AgHg DCSR PHUT; do
- for format in jpg psd; do
- echo "------> Bug $num ($type in $format) <-------" >&2
- filename=exiv2-bug$num-$type.$format
- cp -f ../data/$filename .
- $bin/exiv2 -u -v -M'set Exif.Photo.UserComment Test' $filename
- $bin/exiv2 -u -pt $filename
- done
-done
-
-num=831
-filename=exiv2-bug$num.tif
-printf "$num " >&3
-echo '------>' Bug $num '<-------' >&2
-cp -f ../data/mini9.tif $filename
-$bin/exiv2 -v -Qd -M'set Exif.Image.ImageDescription Just GIMP' $filename
-$bin/exiv2 -v -pa $filename
-
-num=836
-filename=exiv2-bug$num.eps
-echo '------>' Bug $num '<-------' >&2
-cp -f ../data/$filename $filename
-if [ -e $filename/rsrc ]; then
- printf "$num " >&3
- cp -f ../data/$filename.rsrc $filename/rsrc
- $bin/exiv2 -M'set Exif.Photo.UserComment Test' $filename
- diff -q ../data/$filename.rsrc $filename/rsrc
-else
- # skip this test on systems which do not have resource forks
- printf "($num skipped) " >&3
-fi
-
-num=841
-filename=exiv2-bug$num.png
-printf "$num " >&3
-echo '------>' Bug $num '<-------' >&2
-cp -f ../data/$filename $filename
-$bin/exiv2 $filename
+ runTest exiv2 -u -pa -u -b $filename
+
+ num=683
+ filename=`prep_any_file $num exiv2-nikon-d70.jpg`
+ rm -f 2004-03-30-Tue-090.jpg
+ runTest exiv2 -u -f -r %Y-%m-%d-%a-%j $filename
+ ls 2004-03-30-Tue-090.jpg
+
+ num=711
+ printf "$num " >&3
+ # Little endian (II)
+ filename=exiv2-bug${num}-1.jpg
+ copyTestFile exiv2-empty.jpg $filename
+ echo '------>' Bug $num '<-------' >&2
+ runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Initial values, read from the command line' \
+ -M'set Exif.Image.DocumentName Float 0.12345' \
+ -M'set Exif.Image.ImageDescription Double 0.987654321' $filename
+ runTest exiv2 -u -v -PEkyct $filename
+ runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Non-intrusive update' $filename
+ runTest exiv2 -u -v -PEkyct $filename
+ runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch' $filename
+ runTest exiv2 -u -v -PEkyct $filename
+ # Big endian (MM)
+ filename=exiv2-bug${num}-2.jpg
+ copyTestFile exiv2-kodak-dc210.jpg $filename
+ runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Initial values, read from the command line' \
+ -M'set Exif.Image.DocumentName Float 0.12345' \
+ -M'set Exif.Image.ImageDescription Double 0.987654321' $filename
+ runTest exiv2 -u -v -PEkyct $filename
+ runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Non-intrusive update' $filename
+ runTest exiv2 -u -v -PEkyct $filename
+ runTest exiv2 -u -v -M'set Exif.Image.ProcessingSoftware Intrusive update, writing the structure from scratch' $filename
+ runTest exiv2 -u -v -PEkyct $filename
+
+ # Test easy-access keys (using a dummy bug number)
+ if [ 1 = $(existsTest easyaccess-test) ]; then
+ num=726
+ filename=`prep_empty_file $num`
+ runTest exiv2 -u -v -M"set Exif.Image.Make Samsung" $filename
+ runTest easyaccess-test $filename
+ else
+ echo "bugfixes-test.sh: easyaccess-test executable not found. Skipping regression test for issue #726."
+ fi
+
+ # Test 'migration of XMP namespaces' (see #751 and related forum post)
+ num=751
+ filename=`prep_empty_file $num`
+ xmpname=exiv2-bug$num.xmp
+ runTest exiv2 -v -M'reg imageapp orig/' -M 'set Xmp.imageapp.uuid abcd' $filename
+ runTest exiv2 -f -eX $filename
+ cat $xmpname
+ runTest exiv2 -v -M'reg imageapp dest/' -M 'set Xmp.imageapp.uuid abcd' $filename
+ runTest exiv2 -f -eX $filename
+ cat $xmpname
+
+ num=769
+ filename=`prep_empty_file $num`
+ runTest exiv2 -u -v -M"add Exif.Image.Make Canon" -M"add Exif.CanonCs.0x0001 Short 1" -M"add Exif.CanonCs.0x0000 Short 2" $filename
+ runTest exiv2 -u -v -PEkyct $filename
+
+ num=799
+ filename=`prep_empty_file $num`
+ runTest exiv2 -v -m ../data/bug$num.cmd $filename
+ runTest exiv2 -v -pa $filename
+ runTest exiv2 -f -eX $filename
+ cat exiv2-bug$num.xmp
+
+ num=800
+ printf "$num " >&3
+ for type in 8BIM AgHg DCSR PHUT; do
+ for format in jpg psd; do
+ echo "------> Bug $num ($type in $format) <-------" >&2
+ filename=exiv2-bug$num-$type.$format
+ copyTestFile $filename
+ runTest exiv2 -u -v -M'set Exif.Photo.UserComment Test' $filename
+ runTest exiv2 -u -pt $filename
+ done
+ done
+
+ num=831
+ filename=exiv2-bug$num.tif
+ printf "$num " >&3
+ echo '------>' Bug $num '<-------' >&2
+ copyTestFile mini9.tif $filename
+ runTest exiv2 -v -Qd -M'set Exif.Image.ImageDescription Just GIMP' $filename
+ runTest exiv2 -v -pa $filename
+
+ num=836
+ filename=exiv2-bug$num.eps
+ echo '------>' Bug $num '<-------' >&2
+ copyTestFile $filename $filename
+ if [ -e $filename/rsrc ]; then
+ printf "$num " >&3
+ copyTestFile $filename.rsrc $filename/rsrc
+ runTest exiv2 -M'set Exif.Photo.UserComment Test' $filename
+ diff -q ../data/$filename.rsrc $filename/rsrc
+ else
+ # skip this test on systems which do not have resource forks
+ printf "($num skipped) " >&3
+ fi
+
+ num=841
+ filename=exiv2-bug$num.png
+ printf "$num " >&3
+ echo '------>' Bug $num '<-------' >&2
+ copyTestFile $filename
+ runTest exiv2 $filename
) 3>&1 > $results 2>&1
@@ -260,10 +236,7 @@ printf "
"
# ----------------------------------------------------------------------
# Evaluate results
cat $results | sed 's/\x0d$//' > $results-stripped
-diff -q $results-stripped $good
-rc=$?
-if [ $rc -eq 0 ] ; then
- echo "All testcases passed."
-else
- diff -u $good $results-stripped
-fi
+reportTest $results-stripped $good
+
+# That's all Folks!
+##
\ No newline at end of file
diff --git a/test/conversions.sh b/test/conversions.sh
index 67dcd11..0eb0dcf 100755
--- a/test/conversions.sh
+++ b/test/conversions.sh
@@ -1,21 +1,13 @@
-#! /bin/sh
+#!/bin/bash
# XMP parser test driver
# ----------------------------------------------------------------------
# Setup
-export LC_ALL=C
-results="./conversions.out"
-good="../data/conversions.out"
-if [ -z "$EXIV2_BINDIR" ] ; then
- bin="$VALGRIND ../../bin"
-else
- bin="$VALGRIND $EXIV2_BINDIR"
-fi
-cd ./tmp
+source ./functions.source
# ----------------------------------------------------------------------
# Check if xmpparser-test exists
-if [ ! -e ../../bin/xmpparser-test -a ! -e "$EXIV2_BINDIR/xmpparser-test" ] ; then
+if [ $(existsTest xmpparser-test) == 0 ] ; then
echo "xmpparser-test not found. Assuming XMP support is not enabled."
exit 0
fi
@@ -23,18 +15,19 @@ fi
# ----------------------------------------------------------------------
# Main routine
(
+cd ./tmp
IMG=../data/exiv2-empty.jpg
# 1) Convert Exif ImageDescription to XMP x-default langAlt value
echo Testcase 1
echo ==========
--
exiv2 packaging
More information about the pkg-kde-commits
mailing list