diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/iconv/tests/check-stateful |
Fresh start
Diffstat (limited to 'jni/iconv/tests/check-stateful')
-rwxr-xr-x | jni/iconv/tests/check-stateful | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/jni/iconv/tests/check-stateful b/jni/iconv/tests/check-stateful new file mode 100755 index 0000000..c46e692 --- /dev/null +++ b/jni/iconv/tests/check-stateful @@ -0,0 +1,16 @@ +#!/bin/sh +# Simple check of a stateful encoding. +# Usage: check-stateful SRCDIR CHARSET +srcdir="$1" +charset="$2" +set -e + +# charset, modified for use in filenames. +charsetf=`echo "$charset" | sed -e 's,:,-,g'` + +../src/iconv_no_i18n -f "$charset" -t UTF-8 < "${srcdir}"/"$charsetf"-snippet > tmp-snippet +cmp "${srcdir}"/"$charsetf"-snippet.UTF-8 tmp-snippet +../src/iconv_no_i18n -f UTF-8 -t "$charset" < "${srcdir}"/"$charsetf"-snippet.UTF-8 > tmp-snippet +cmp "${srcdir}"/"$charsetf"-snippet tmp-snippet +rm -f tmp-snippet +exit 0 |