blob: f68515aa234dc1b077468967af11803c813a22c7 [file] [log] [blame]
#!/bin/sh
# Simple check of a stateful encoding.
# Usage: check-stateful SRCDIR CHARSET
srcdir="$1"
charset="$2"
set -e
../src/iconv -f "$charset" -t UTF-8 < "${srcdir}"/"$charset"-snippet > tmp-snippet
cmp "${srcdir}"/"$charset"-snippet.UTF-8 tmp-snippet
../src/iconv -f UTF-8 -t "$charset" < "${srcdir}"/"$charset"-snippet.UTF-8 > tmp-snippet
cmp "${srcdir}"/"$charset"-snippet tmp-snippet
rm -f tmp-snippet
exit 0