X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2Fanselconv.test;h=a78cf46e080822170ca36bbc115bfb827dc4d2d0;hb=e5f86c3d527897be1f7e7135ffdfc023831aaebd;hp=2eb049585291826ce8be9521750e97bf40462475;hpb=0495d4e0721b39737eee83b73e8185f7602e0f1f;p=gedcom-parse.git diff --git a/t/anselconv.test b/t/anselconv.test index 2eb0495..a78cf46 100755 --- a/t/anselconv.test +++ b/t/anselconv.test @@ -1,5 +1,7 @@ #!/bin/sh +logfile=check.out + # For use outside Makefile if [ -z "$srcdir" ] then @@ -21,18 +23,27 @@ then export PATH fi -echo "Testing conversion from ANSEL to UTF-8" >> testgedcom.out -iconv -f ANSEL -t UTF-8 $srcdir/input/ansel.ged > anselutf8.out -if ! diff $srcdir/input/anselutf8.ged anselutf8.out >> testgedcom.out +echo "======================================================">> $logfile +echo "Performing test 'anselconv'" >> $logfile +echo "Testing conversion from ANSEL to UTF-8" >> $logfile +iconv -f ANSEL -t UTF-8 $srcdir/input/ansel.ged > anselconv_utf8.out 2>>$logfile +if diff $srcdir/input/anselutf8.ged anselconv_utf8.out >/dev/null 2>> $logfile then - retval=1 -else - echo "Testing conversion from UTF-8 to ANSEL" >> testgedcom.out - iconv -f UTF-8 -t ANSEL $srcdir/input/anselutf8.ged > ansel.out - if ! diff $srcdir/input/ansel.ged ansel.out >> testgedcom.out + echo "Output agrees with reference output" >> $logfile + rm anselconv_utf8.out + echo "Testing conversion from UTF-8 to ANSEL" >> $logfile + iconv -f UTF-8 -t ANSEL $srcdir/input/anselutf8.ged > anselconv_ansel.out 2>>$logfile + if diff $srcdir/input/ansel.ged anselconv_ansel.out >/dev/null 2>> $logfile then + echo "Output agrees with reference output" >> $logfile + rm anselconv_ansel.out + else + echo "Difference with reference output detected!" >> $logfile retval=1 fi +else + echo "Difference with reference output detected!" >> $logfile + retval=1 fi rm gedcom.enc