summaryrefslogtreecommitdiff
path: root/iconvdata/tst-table.sh
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-04-19 07:49:16 +0000
committerUlrich Drepper <drepper@redhat.com>2002-04-19 07:49:16 +0000
commit9813858f9f94a58eef876a54cc369f286332a532 (patch)
tree3711fbceefbb97a9819a65b3b22ea30bf2c3ffea /iconvdata/tst-table.sh
parentb459976e27aee31b9be3b31cb6c95f35226f1a57 (diff)
Update.
2002-04-15 Bruno Haible <bruno@clisp.org> * iconvdata/armscii-8.c (BODY for FROM_LOOP): Fix array access. (BODY for TO_LOOP): Likewise. * iconvdata/tcvn5712-1.c (from_ucs4): Map U+0309 to 0xB1. * iconvdata/tst-table.sh: Add support for encodings which contain precomposed Unicode characters, known to the iconv converter in both directions but not listed in the charmap. * iconvdata/IBM856.irreversible: New file. * iconvdata/IBM922.irreversible: New file. * iconvdata/IBM1132.irreversible: New file. * iconvdata/IBM1133.irreversible: New file. * iconvdata/IBM1160.irreversible: New file. * iconvdata/IBM1161.irreversible: New file. * iconvdata/IBM1163.irreversible: New file. * iconvdata/IBM1164.irreversible: New file. * iconvdata/ARMSCII-8.irreversible: New file. * iconvdata/TCVN5712-1.precomposed: New file. * iconvdata/tst-tables.sh: Add IBM856, IBM922, IBM1124, IBM1129, IBM1160, IBM1161, IBM1132, IBM1133, IBM1162, IBM1163, IBM1164, ARMSCII-8, TCVN5712-1. * iconvdata/Makefile (distribute): Add IBM856.irreversible, IBM922.irreversible, IBM1132.irreversible, IBM1133.irreversible, IBM1160.irreversible, IBM1161.irreversible, IBM1163.irreversible, IBM1164.irreversible, ARMSCII-8.irreversible, TCVN5712-1.precomposed. 2002-04-17 Jakub Jelinek <jakub@redhat.com> * time/tst-mktime.c: Include <stdlib.h>. Use %d, not %ld format for EVENING69. Include offsets in TZ environment variable.
Diffstat (limited to 'iconvdata/tst-table.sh')
-rwxr-xr-xiconvdata/tst-table.sh29
1 files changed, 20 insertions, 9 deletions
diff --git a/iconvdata/tst-table.sh b/iconvdata/tst-table.sh
index fb427034eb..7b3ad92c1e 100755
--- a/iconvdata/tst-table.sh
+++ b/iconvdata/tst-table.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# Contributed by Bruno Haible <haible@clisp.cons.org>, 2000.
#
@@ -39,7 +39,10 @@ ${SHELL} tst-table-charmap.sh ${charmap:-$charset} \
< ../localedata/charmaps/${charmap:-$charset} \
> ${objpfx}tst-${charset}.charmap.table
-# Precompute expected differences between the two iconv directions.
+# Precomputed expexted differences between the charmap and iconv forward.
+precomposed=${charset}.precomposed
+
+# Precompute expected differences between the charmap and iconv backward.
if test ${charset} = EUC-TW; then
irreversible=${objpfx}tst-${charset}.irreversible
(grep '^0x8EA1' ${objpfx}tst-${charset}.charmap.table
@@ -59,29 +62,37 @@ ${common_objpfx}elf/ld.so --library-path $common_objpfx \
${objpfx}tst-table-to ${charset} | sort \
> ${objpfx}tst-${charset}.inverse.table
-# Difference between the two iconv directions.
-diff ${objpfx}tst-${charset}.table ${objpfx}tst-${charset}.inverse.table | \
+# Difference between the charmap and iconv backward.
+diff ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.inverse.table | \
grep '^[<>]' | sed -e 's,^. ,,' > ${objpfx}tst-${charset}.irreversible.table
-# Check 1: charmap and iconv forward should be identical.
+# Check 1: charmap and iconv forward should be identical, except for
+# precomposed characters.
if test ${charset} = GB18030; then
grep '0x....$' < ${objpfx}tst-${charset}.charmap.table \
> ${objpfx}tst-${charset}.truncated.table
cmp -s ${objpfx}tst-${charset}.truncated.table ${objpfx}tst-${charset}.table ||
exit 1
else
- cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.table ||
- exit 1
+ if test -f ${precomposed}; then
+ cat ${objpfx}tst-${charset}.table ${precomposed} | sort | uniq -u \
+ > ${objpfx}tst-${charset}.tmp.table
+ cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.tmp.table ||
+ exit 1
+ else
+ cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.table ||
+ exit 1
+ fi
fi
-# Check 2: the difference between the two iconv directions.
+# Check 2: the difference between the charmap and iconv backward.
if test -f ${irreversible}; then
cat ${objpfx}tst-${charset}.charmap.table ${irreversible} | sort | uniq -u \
> ${objpfx}tst-${charset}.tmp.table
cmp -s ${objpfx}tst-${charset}.tmp.table ${objpfx}tst-${charset}.inverse.table ||
exit 1
else
- cmp -s ${objpfx}tst-${charset}.table ${objpfx}tst-${charset}.inverse.table ||
+ cmp -s ${objpfx}tst-${charset}.charmap.table ${objpfx}tst-${charset}.inverse.table ||
exit 1
fi