Update.
[glibc.git] / localedata / sort-test.sh
blob322d40cb2cec9e5e085a19a3cfe5e29b8b6b2a86
1 #! /bin/sh
3 common_objpfx=$1; shift
4 lang=$*
6 id=${PPID:-100}
7 here=`pwd`
9 # Generate data files.
10 for l in $lang; do
11 cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'`
12 cn=locales/$cns
13 fn=charmaps/`echo $l | sed 's/.*[.]\([^.]*\)/\1/'`
14 I18NPATH=. ${common_objpfx}elf/ld.so --library-path $common_objpfx \
15 ${common_objpfx}locale/localedef --quiet -i $cn -f $fn \
16 ${common_objpfx}localedata/$cns
17 done
19 # Run collation tests.
20 status=0
21 for l in $lang; do
22 cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'`
23 LOCPATH=${common_objpfx}localedata LC_ALL=$cns \
24 ${common_objpfx}elf/ld.so --library-path $common_objpfx \
25 ${common_objpfx}localedata/collate-test $id < $cns.in \
26 > ${common_objpfx}localedata/$cns.out || status=1
27 cmp -s $cns.in ${common_objpfx}localedata/$cns.out || status=1
29 LOCPATH=${common_objpfx}localedata LC_ALL=$cns \
30 ${common_objpfx}elf/ld.so --library-path $common_objpfx \
31 ${common_objpfx}localedata/xfrm-test $id < $cns.in \
32 > ${common_objpfx}localedata/$cns.xout || status=1
33 cmp -s $cns.in ${common_objpfx}localedata/$cns.xout || status=1
34 done
36 exit $status
37 # Local Variables:
38 # mode:shell-script
39 # End: