File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / libiconv / tests / check-stateful
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Wed Mar 17 13:38:46 2021 UTC (3 years, 9 months ago) by misho
Branches: libiconv, MAIN
CVS tags: v1_16p0, HEAD
libiconv 1.16

    1: #!/bin/sh
    2: # Simple check of a stateful encoding.
    3: # Usage: check-stateful SRCDIR CHARSET
    4: srcdir="$1"
    5: charset="$2"
    6: set -e
    7: 
    8: # charset, modified for use in filenames.
    9: charsetf=`echo "$charset" | sed -e 's,:,-,g'`
   10: 
   11: if test -f "${srcdir}"/"$charsetf"-snippet.alt; then
   12:   ../src/iconv_no_i18n -f "$charset" -t UTF-8 < "${srcdir}"/"$charsetf"-snippet.alt > tmp-snippet
   13:   cmp "${srcdir}"/"$charsetf"-snippet.UTF-8 tmp-snippet
   14: fi
   15: ../src/iconv_no_i18n -f "$charset" -t UTF-8 < "${srcdir}"/"$charsetf"-snippet > tmp-snippet
   16: cmp "${srcdir}"/"$charsetf"-snippet.UTF-8 tmp-snippet
   17: ../src/iconv_no_i18n -f UTF-8 -t "$charset" < "${srcdir}"/"$charsetf"-snippet.UTF-8 > tmp-snippet
   18: cmp "${srcdir}"/"$charsetf"-snippet tmp-snippet
   19: rm -f tmp-snippet
   20: exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>