From f3e98f152da80e4844bcc9430cc04908fa1a6d21 Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Wed, 25 Jan 2006 09:40:11 +0000 Subject: [PATCH] Improved filtering of irrelevant differences on MinGW --- test/bugfixes-test.sh | 3 +++ test/exiv2-test.sh | 13 ++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh index e5baecf0..3725f687 100755 --- a/test/bugfixes-test.sh +++ b/test/bugfixes-test.sh @@ -52,6 +52,9 @@ $binpath/exiv2 -pi $filename ) > $results 2>&1 +if [ x`which unix2dos.exe` != x ]; then + unix2dos.exe -q $results +fi diff -q $diffargs $results $good rc=$? if [ $rc -eq 0 ] ; then diff --git a/test/exiv2-test.sh b/test/exiv2-test.sh index 6e3375da..d61636ce 100755 --- a/test/exiv2-test.sh +++ b/test/exiv2-test.sh @@ -5,13 +5,20 @@ export LD_LIBRARY_PATH exiv2="$VALGRIND ../../src/exiv2" results="./tmp/exiv2-test.out" good="./data/exiv2-test.out" -diffargs="--strip-trailing-cr" tmpfile=tmp/ttt touch $tmpfile -diff -q $diffargs $tmpfile $tmpfile 2>/dev/null +da1="--strip-trailing-cr" +diff -q $da1 $tmpfile $tmpfile 2>/dev/null if [ $? -ne 0 ] ; then - diffargs="" + da1="" fi +da2="--ignore-matching-lines=^Usage:.exiv2" +diff -q $da2 $tmpfile $tmpfile 2>/dev/null +if [ $? -ne 0 ] ; then + da2="" +fi +diffargs="$da1 $da2" + ( images="exiv2-empty.jpg \ exiv2-canon-powershot-s40.jpg \