#! /bin/sh # Test driver for CRW file operations # ---------------------------------------------------------------------- # Setup results="./tmp/crw-test.out" good="./data/crw-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 # ---------------------------------------------------------------------- # Main routine ( LD_LIBRARY_PATH=../../src:$LD_LIBRARY_PATH export LD_LIBRARY_PATH binpath="$VALGRIND ../../src" cmdfile=cmdfile crwfile=exiv2-canon-powershot-s40.crw cd ./tmp # ---------------------------------------------------------------------- # Testcases: Add and modify tags cat > $cmdfile < $cmdfile < $results 2>&1 # ---------------------------------------------------------------------- # Evaluate results diff -q $diffargs $results $good rc=$? if [ $rc -eq 0 ] ; then echo "All testcases passed." else diff $diffargs $results $good fi