Source

uchardet-enhanced / testdata / runtest

#!/bin/sh

for lang in ??
do 
  for code in $lang/*
  do 
    code="`basename $code`"
    ucode="`echo $code | tr a-z A-Z`"
    testfile=$lang/$code/wikitop_${lang}_${code}.txt
    rescode=`../libcharsetdetect/trchardet < $testfile | tail -1`
    urescode="`echo $rescode | tr a-z A-Z`"
    if test X"$ucode" != X"$urescode"; then
       echo "Error: $lang $ucode  -> $urescode"
    fi
  done
done