diff options
Diffstat (limited to 'localedata')
-rw-r--r-- | localedata/Makefile | 23 | ||||
-rw-r--r-- | localedata/gen-locale.sh | 45 | ||||
-rw-r--r-- | localedata/sort-test.sh | 15 | ||||
-rwxr-xr-x | localedata/tst-ctype.sh | 23 | ||||
-rwxr-xr-x | localedata/tst-mbswcs.sh | 19 |
5 files changed, 67 insertions, 58 deletions
diff --git a/localedata/Makefile b/localedata/Makefile index 97126bfd40..7658ff727a 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -135,10 +135,27 @@ do-tst-trans: tst-trans.sh $(objpfx)tst-trans do-tst-mbswcs: tst-mbswcs.sh $(objpfx)tst-mbswcs1 $(objpfx)tst-mbswcs2 \ $(objpfx)tst-mbswcs3 $(objpfx)tst-mbswcs4 $(objpfx)tst-mbswcs5 $(SHELL) -e $< $(common-objpfx) -do-tst-ctype: tst-ctype.sh $(objpfx)tst-ctype do-collate-test do-tst-mbswcs +do-tst-ctype: tst-ctype.sh $(objpfx)tst-ctype do-collate-test $(SHELL) -e $< $(common-objpfx) -$(addsuffix .out,$(addprefix $(objpfx),$(locale_test_suite))): %: do-tst-ctype\ - do-tst-mbswcs + +# Theses locales are generated by gen-locale.sh +LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \ + en_US.ISO-8859-1 ja_JP.EUC-JP + +LOCALE_FILES := LC_ADDRESS LC_IDENTIFICATION LC_MONETARY LC_PAPER \ + LC_COLLATE LC_MEASUREMENT LC_NAME LC_TELEPHONE LC_CTYPE \ + LC_NUMERIC LC_TIME LC_MESSAGES/SYS_LC_MESSAGES + +ALL_LC_FILES := $(foreach locale, $(LOCALES), \ + $(addprefix $(locale)/, $(LOCALE_FILES))) + +ALL_OBJ_LC_FILES := $(addprefix $(objpfx), $(ALL_LC_FILES)) + +$(ALL_OBJ_LC_FILES): gen-locale.sh Makefile charmaps/* locales/* + $(SHELL) -e gen-locale.sh $(common-objpfx) + +$(addsuffix .out,$(addprefix $(objpfx),$(locale_test_suite))): %: $(ALL_OBJ_LC_FILES) + endif endif diff --git a/localedata/gen-locale.sh b/localedata/gen-locale.sh new file mode 100644 index 0000000000..4bc7031f71 --- /dev/null +++ b/localedata/gen-locale.sh @@ -0,0 +1,45 @@ +#! /bin/sh +# Generate test locale files +# Copyright (C) 2000 Free Software Foundation, Inc. +# This file is part of the GNU C Library. +# +# The GNU C Library is free software; you can redistribute it and/or +# modify it under the terms of the GNU Library General Public License as +# published by the Free Software Foundation; either version 2 of the +# License, or (at your option) any later version. +# +# The GNU C Library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public +# License along with the GNU C Library; see the file COPYING.LIB. If +# not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +common_objpfx=$1; shift + +generate_locale () +{ + charmap=$1 + input=$2 + out=$3 + I18NPATH=. GCONV_PATH=${common_objpfx}iconvdata \ + ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + ${common_objpfx}locale/localedef --quiet -c -f $charmap -i $input \ + ${common_objpfx}localedata/$out + + if [ $? -ne 0 ]; then + echo "Charmap: \"${charmap}\" Inputfile: \"${input}\"" \ + "Outputdir: \"${out}\" failed" + exit 1 + fi +} + +generate_locale UTF8 de_DE de_DE.UTF-8 +generate_locale ISO-8859-1 de_DE de_DE.ISO-8859-1 +generate_locale ISO-8859-1 en_US en_US.ISO-8859-1 +generate_locale EUC-JP ja_JP ja_JP.EUC-JP +generate_locale ANSI_X3.4-1968 en_US en_US.ANSI_X3.4-1968 + diff --git a/localedata/sort-test.sh b/localedata/sort-test.sh index be5693a492..18dbcd5362 100644 --- a/localedata/sort-test.sh +++ b/localedata/sort-test.sh @@ -6,29 +6,18 @@ lang=$* id=${PPID:-100} here=`pwd` -# Generate data files. -for l in $lang; do - cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'` - cn=locales/$cns - fn=charmaps/`echo $l | sed 's/.*[.]\([^.]*\)/\1/'` - I18NPATH=. GCONV_PATH=${common_objpfx}/iconvdata \ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${common_objpfx}locale/localedef --quiet -i $cn -f $fn \ - ${common_objpfx}localedata/$cns -done - # Run collation tests. status=0 for l in $lang; do cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'` LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}/iconvdata \ - LC_ALL=$cns ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + LC_ALL=$l ${common_objpfx}elf/ld.so --library-path $common_objpfx \ ${common_objpfx}localedata/collate-test $id < $cns.in \ > ${common_objpfx}localedata/$cns.out || status=1 cmp -s $cns.in ${common_objpfx}localedata/$cns.out || status=1 LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}/iconvdata \ - LC_ALL=$cns ${common_objpfx}elf/ld.so --library-path $common_objpfx \ + LC_ALL=$l ${common_objpfx}elf/ld.so --library-path $common_objpfx \ ${common_objpfx}localedata/xfrm-test $id < $cns.in \ > ${common_objpfx}localedata/$cns.xout || status=1 cmp -s $cns.in ${common_objpfx}localedata/$cns.xout || status=1 diff --git a/localedata/tst-ctype.sh b/localedata/tst-ctype.sh index 135d7b4daf..32926d8c9d 100755 --- a/localedata/tst-ctype.sh +++ b/localedata/tst-ctype.sh @@ -19,29 +19,6 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. common_objpfx=$1; shift - -generate_locale () -{ - charmap=$1 - input=$2 - out=$3 - I18NPATH=. GCONV_PATH=${common_objpfx}iconvdata \ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${common_objpfx}locale/localedef --quiet -c -f $charmap -i $input \ - ${common_objpfx}localedata/$out - - if [ $? -ne 0 ]; then - echo "Charmap: \"${charmap}\" Inputfile: \"${input}\"" \ - "Outputdir: \"${out}\" failed" - exit 1 - fi -} - -generate_locale EUC-JP ja_JP ja_JP.EUC-JP -# XXX This is a hack for now. We need the en_US.ANSI_X3.4-1968 locale -# XXX elsewhere -generate_locale ANSI_X3.4-1968 en_US en_US.ANSI_X3.4-1968 - status=0 # Run the test programs. diff --git a/localedata/tst-mbswcs.sh b/localedata/tst-mbswcs.sh index 02bb273669..267ab48da2 100755 --- a/localedata/tst-mbswcs.sh +++ b/localedata/tst-mbswcs.sh @@ -20,25 +20,6 @@ common_objpfx=$1; shift -generate_locale () -{ - charmap=$1 - input=$2 - out=$3 - I18NPATH=. GCONV_PATH=${common_objpfx}iconvdata \ - ${common_objpfx}elf/ld.so --library-path $common_objpfx \ - ${common_objpfx}locale/localedef --quiet -c -f $charmap -i $input \ - ${common_objpfx}localedata/$out - - if [ $? -ne 0 ]; then - echo "Charmap: \"${charmap}\" Inputfile: \"${input}\"" \ - "Outputdir: \"${out}\" failed" - exit 1 - fi -} - -generate_locale UTF8 de_DE de_DE.UTF-8 - status=0 # Run the test programs. |