Switch to libtool 2.5.3.
[libiconv.git] / tests / check-tag
blob426f316d338db8978cd54cc6ed6006d9a1d734c8
1 #!/bin/sh
2 # Check that files on z/OS are properly tagged with their CCSIDs
3 set -e
4 host_os="$1"
5 iconv=../src/iconv_no_i18n
7 # This test is only meaningful on z/OS (previously called OS/390)
8 rc=0
9 if test "${host_os}" = 'openedition' ; then
11 printf 'hello' | $iconv -f ISO8859-1 -t IBM-1047 > tmp-tag-1
12 if ls -T tmp-tag-1 | grep -v 'IBM-1047' ; then
13 echo "tmp-tag-1 is not correctly tagged as IBM-1047." >&2
14 rc=1
16 printf 'hello' | $iconv -f ISO8859-1 -t IBM-1047 >tmp-tag-ebcdic
18 $iconv -f IBM-1047 -t ISO-8859-2 <tmp-tag-ebcdic > tmp-tag-2
19 if ls -T tmp-tag-2 | grep -v 'ISO8859-2' ; then
20 echo "tmp-tag-2 is not correctly tagged as ISO8859-2." >&2
21 rc=1
23 $iconv -f IBM-1047 -t CP037 <tmp-tag-ebcdic > tmp-tag-7
24 if ls -T tmp-tag-7 | grep -v 'IBM-037' ; then
25 echo "tmp-tag-7 is not correctly tagged as IBM-037." >&2
26 rc=1
28 $iconv -f IBM-1047 -t UTF-8 <tmp-tag-ebcdic > tmp-tag-8
29 if ls -T tmp-tag-8 | grep -v 'UTF-8' ; then
30 echo "tmp-tag-8 is not correctly tagged as UTF-8." >&2
31 rc=1
33 $iconv -f IBM-1047 -t ISO_8859-9 <tmp-tag-ebcdic > tmp-tag-9
34 if ls -T tmp-tag-9 | grep -v 'ISO8859-9' ; then
35 echo "tmp-tag-9 is not correctly tagged as ISO8859-9." >&2
36 rc=1
39 if [ $rc -eq 0 ] ; then
40 rm -f tmp-tag-*
44 exit $rc