aboutsummaryrefslogtreecommitdiff
path: root/iconvdata
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-02-05 05:57:24 +0000
committerUlrich Drepper <drepper@redhat.com>2001-02-05 05:57:24 +0000
commit93693c4d820dac2f218e144f5126a5a761f1cfbf (patch)
tree7371d326f24a3c9d73fed75e7792133d0d654a50 /iconvdata
parent377c725f8e2dba91af36af27206e6deb85cf6e6f (diff)
downloadglibc-93693c4d820dac2f218e144f5126a5a761f1cfbf.zip
glibc-93693c4d820dac2f218e144f5126a5a761f1cfbf.tar.gz
glibc-93693c4d820dac2f218e144f5126a5a761f1cfbf.tar.bz2
Update.
2001-02-04 Ulrich Drepper <drepper@redhat.com> * iconv/Makefile (iconv_prog-modules): Define. Add vpath to find files in locale/programs. Add CFLAGS definition to allow compiling localedef files. * iconv/dummy-repertoire.c: New file. * iconv/iconv_charmap.c: New file. * iconv/iconv_prog.h: New file. * iconv/iconv_prog.c: Make verbose and omit_invalid global. (main): If parameter for -f and -t contain slashes try first to resolve the strings as filenames of charmap files. Use them for conversion in this case. * iconvdata/run-iconv-test.sh: If charmaps exist also run tests with iconv getting charmap names as parameters. * locale/programs/linereader.c (lr_token): Take extra parameters verbose and pass it to get_string. (get_string): Take extra parameters verbose. * locale/programs/charmap.c (parse_charmap): Take extra parameters verbose and be_quiet. Change all callers of lr_token and parse_charmap. * locale/programs/charmap.h: Likewise. * locale/programs/ld-address.c: Likewise. * locale/programs/ld-collate.c: Likewise. * locale/programs/ld-ctype.c: Likewise. * locale/programs/ld-identification.c: Likewise. * locale/programs/ld-measurement.c: Likewise. * locale/programs/ld-messages.c: Likewise. * locale/programs/ld-monetary.c: Likewise. * locale/programs/ld-name.c: Likewise. * locale/programs/ld-numeric.c: Likewise. * locale/programs/ld-paper.c: Likewise. * locale/programs/ld-telephone.c: Likewise. * locale/programs/ld-time.c: Likewise. * locale/programs/linereader.c: Likewise. * locale/programs/linereader.h: Likewise. * locale/programs/localedef.c: Likewise. * locale/programs/locfile.c: Likewise. * locale/programs/locfile.h: Likewise. * locale/programs/repertoire.c: Likewise.
Diffstat (limited to 'iconvdata')
-rwxr-xr-xiconvdata/run-iconv-test.sh58
1 files changed, 36 insertions, 22 deletions
diff --git a/iconvdata/run-iconv-test.sh b/iconvdata/run-iconv-test.sh
index e20d196..3388e80 100755
--- a/iconvdata/run-iconv-test.sh
+++ b/iconvdata/run-iconv-test.sh
@@ -59,13 +59,10 @@ while read from to subset targets; do
if test -n "$targets"; then
for t in $targets; do
if test -f testdata/$from; then
- echo $ac_n "test data: $from -> $t $ac_c"
+ echo $ac_n " test data: $from -> $t $ac_c"
$PROG -f $from -t $t testdata/$from > $temp1 ||
{ if test $? -gt 128; then exit 1; fi
- echo "FAILED"
- failed=1
- continue
- }
+ echo "FAILED"; failed=1; continue; }
echo $ac_n "OK$ac_c"
if test -s testdata/$from..$t; then
cmp $temp1 testdata/$from..$t > /dev/null 2>&1 ||
@@ -75,10 +72,7 @@ while read from to subset targets; do
echo $ac_n " -> $from $ac_c"
$PROG -f $t -t $to -o $temp2 $temp1 ||
{ if test $? -gt 128; then exit 1; fi
- echo "FAILED"
- failed=1
- continue
- }
+ echo "FAILED"; failed=1; continue; }
echo $ac_n "OK$ac_c"
test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 ||
{ echo "/FAILED"; failed=1; continue; }
@@ -90,21 +84,45 @@ while read from to subset targets; do
# of the coded character set we convert the text to this coded character
# set. Otherwise we convert to all the TARGETS.
if test $subset = Y; then
- echo $ac_n " suntzu: $from -> $t -> $to $ac_c"
+ echo $ac_n " suntzu: $from -> $t -> $to $ac_c"
$PROG -f $from -t $t testdata/suntzus |
$PROG -f $t -t $to > $temp1 ||
{ if test $? -gt 128; then exit 1; fi
- echo "FAILED"
- failed=1
- continue
- }
+ echo "FAILED"; failed=1; continue; }
echo $ac_n "OK$ac_c"
cmp testdata/suntzus $temp1 ||
- { echo "/FAILED";
- failed=1; continue; }
+ { echo "/FAILED"; failed=1; continue; }
echo "/OK"
fi
rm -f $temp1
+
+ # And tests where iconv(1) has to handle charmaps.
+ if test "$t" = UTF8; then tc=UTF-8; else tc="$t"; fi
+ if test -f ../localedata/charmaps/$from &&
+ test -f ../localedata/charmaps/$tc &&
+ test -f testdata/$from; then
+ echo $ac_n "test charmap: $from -> $t $ac_c"
+ $PROG -f ../localedata/charmaps/$from -t ../localedata/charmaps/$tc \
+ testdata/$from > $temp1 ||
+ { if test $? -gt 128; then exit 1; fi
+ echo "FAILED"; failed=1; continue; }
+ echo $ac_n "OK$ac_c"
+ if test -s testdata/$from..$t; then
+ cmp $temp1 testdata/$from..$t > /dev/null 2>&1 ||
+ { echo "/FAILED"; failed=1; continue; }
+ echo $ac_n "/OK$ac_c"
+ fi
+ echo $ac_n " -> $from $ac_c"
+ $PROG -t ../localedata/charmaps/$from -f ../localedata/charmaps/$tc \
+ -o $temp2 $temp1 ||
+ { if test $? -gt 128; then exit 1; fi
+ echo "FAILED"; failed=1; continue; }
+ echo $ac_n "OK$ac_c"
+ test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 ||
+ { echo "/FAILED"; failed=1; continue; }
+ echo "/OK"
+ rm -f $temp1 $temp2
+ fi
done
fi
@@ -113,14 +131,10 @@ while read from to subset targets; do
$PROG -f ASCII -t $to testdata/suntzus |
$PROG -f $to -t ASCII > $temp1 ||
{ if test $? -gt 128; then exit 1; fi
- echo "FAILED"
- failed=1
- continue
- }
+ echo "FAILED"; failed=1; continue; }
echo $ac_n "OK$ac_c"
cmp testdata/suntzus $temp1 ||
- { echo "/FAILED";
- failed=1; continue; }
+ { echo "/FAILED"; failed=1; continue; }
echo "/OK"
fi
done < TESTS