(AIO_MISC_NOTIFY): Don't decrement counterp if it is already zero.
[glibc/history.git] / localedata / sort-test.sh
blob67de72eef314560bfe9ca5e17fc33b11f8f95444
1 #! /bin/sh
3 common_objpfx=$1; shift
4 run_program_prefix=$1; shift
5 lang=$*
7 id=${PPID:-100}
8 here=`pwd`
10 # Run collation tests.
11 status=0
12 for l in $lang; do
13 here=0
14 cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'`
15 LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}/iconvdata \
16 LC_ALL=$l ${run_program_prefix} \
17 ${common_objpfx}localedata/collate-test $id < $cns.in \
18 > ${common_objpfx}localedata/$cns.out || here=1
19 cmp -s $cns.in ${common_objpfx}localedata/$cns.out || here=1
20 if test $here -eq 0; then
21 echo "$l collate-test OK"
22 else
23 echo "$l collate-test FAIL"
24 diff -u $cns.in ${common_objpfx}localedata/$cns.out | sed 's/^/ /'
25 status=1
28 LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}/iconvdata \
29 LC_ALL=$l ${run_program_prefix} \
30 ${common_objpfx}localedata/xfrm-test $id < $cns.in \
31 > ${common_objpfx}localedata/$cns.xout || here=1
32 cmp -s $cns.in ${common_objpfx}localedata/$cns.xout || here=1
33 if test $here -eq 0; then
34 echo "$l xfrm-test OK"
35 else
36 echo "$l xfrm-test FAIL"
37 diff -u $cns.in ${common_objpfx}localedata/$cns.xout | sed 's/^/ /'
38 status=1
40 done
42 exit $status
43 # Local Variables:
44 # mode:shell-script
45 # End: