|
|
@ -2,6 +2,13 @@
|
|
|
|
# Test driver to run the addmoddel sample program
|
|
|
|
# Test driver to run the addmoddel sample program
|
|
|
|
results="./tmp/addmoddel.out"
|
|
|
|
results="./tmp/addmoddel.out"
|
|
|
|
good="./data/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
|
|
|
|
(
|
|
|
|
(
|
|
|
|
LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
|
|
|
|
LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH
|
|
|
|
exiv2="../../src/exiv2"
|
|
|
|
exiv2="../../src/exiv2"
|
|
|
@ -12,10 +19,10 @@ $binpath/addmoddel exiv2-empty.jpg
|
|
|
|
$binpath/exiv2 -pv exiv2-empty.jpg
|
|
|
|
$binpath/exiv2 -pv exiv2-empty.jpg
|
|
|
|
) > $results
|
|
|
|
) > $results
|
|
|
|
|
|
|
|
|
|
|
|
diff -q --strip-trailing-cr $results $good
|
|
|
|
diff -q $diffargs $results $good
|
|
|
|
rc=$?
|
|
|
|
rc=$?
|
|
|
|
if [ $rc -eq 0 ] ; then
|
|
|
|
if [ $rc -eq 0 ] ; then
|
|
|
|
echo "All testcases passed."
|
|
|
|
echo "All testcases passed."
|
|
|
|
else
|
|
|
|
else
|
|
|
|
diff --strip-trailing-cr $results $good
|
|
|
|
diff $diffargs $results $good
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|