Portability fix: isdigit expects unsigned char.
[gedcom-parse.git] / t / anselconv.test
index 59cae594e4985f32ff4f63ef4d4a4b513138713f..be99800edc53705bcc412468d41989cc0b380c7c 100755 (executable)
@@ -7,7 +7,8 @@ then
 fi
 builddir=`pwd`
 
-export GCONV_PATH=.:$GCONV_PATH
+GCONV_PATH=.:$GCONV_PATH
+export GCONV_PATH
 ln -s $srcdir/../data/gedcom.enc .
 ln -s $builddir/../iconv/glibc/.libs/ANSI_Z39.47.so .
 ln -s $srcdir/../iconv/glibc/gconv-modules .
@@ -16,21 +17,24 @@ retval=0
 
 if [ "$ICONV_PATH" ]
 then
-  export PATH=$ICONV_PATH:$PATH
+  PATH=$ICONV_PATH:$PATH
+  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
+if diff $srcdir/input/anselutf8.ged anselutf8.out >> testgedcom.out
 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
+  if diff $srcdir/input/ansel.ged ansel.out >> testgedcom.out
   then
+    :
+  else
     retval=1
   fi
+else
+  retval=1
 fi
 
 rm gedcom.enc