Source

uchardet-enhanced / testdata / runtest

#!/bin/sh

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