From 3434496d0dde288cd9e1014e28e354ccde6b39e4 Mon Sep 17 00:00:00 2001 From: vog Date: Tue, 28 Jun 2011 00:38:04 +0000 Subject: [PATCH] improved coding style of EPS test driver --- test/eps-test.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/eps-test.sh b/test/eps-test.sh index bc704b28..996ca863 100755 --- a/test/eps-test.sh +++ b/test/eps-test.sh @@ -1,10 +1,10 @@ #! /bin/sh # Test driver for EPS files +# ---------------------------------------------------------------------- +# Setup export LC_ALL=C - cd tmp/ - if [ -z "$EXIV2_BINDIR" ] ; then bin="$VALGRIND ../../src" samples="$VALGRIND ../../samples" @@ -12,18 +12,15 @@ else bin="$VALGRIND $EXIV2_BINDIR" samples="$VALGRIND $EXIV2_BINDIR" fi - exiv2version="`$bin/exiv2 -V | sed -n '1 s,^exiv2 \([^ ]*\).*,\1,p'`" if [ -z "$exiv2version" ]; then echo "Error: Unable to determine Exiv2 version" exit 1 fi - diffargs="--strip-trailing-cr" if ! diff -q $diffargs /dev/null /dev/null 2>/dev/null ; then diffargs="" fi - for file in ../data/eps/eps-*.eps.newxmp; do if ! grep "@Exiv2Version@" "$file" >/dev/null ; then echo "Error: data/eps/$file contains hard-coded Exiv2 version" @@ -31,6 +28,8 @@ for file in ../data/eps/eps-*.eps.newxmp; do fi done +# ---------------------------------------------------------------------- +# Tests ( for file in ../data/eps/eps-*.eps; do image="`basename "$file" .eps`" @@ -118,9 +117,10 @@ done echo "." +# ---------------------------------------------------------------------- +# Result if ! diff -q $diffargs "../data/eps/eps-test.out" "eps-test.out" ; then diff -u $diffargs "../data/eps/eps-test.out" "eps-test.out" exit 1 fi - echo "All testcases passed."