]>
Commit | Line | Data |
---|---|---|
f5f52655 | 1 | #! /bin/sh |
9a9028b1 | 2 | # Test collation using xfrm-test. |
d4697bc9 | 3 | # Copyright (C) 1997-2014 Free Software Foundation, Inc. |
9a9028b1 DL |
4 | # This file is part of the GNU C Library. |
5 | ||
6 | # The GNU C Library is free software; you can redistribute it and/or | |
7 | # modify it under the terms of the GNU Lesser General Public | |
8 | # License as published by the Free Software Foundation; either | |
9 | # version 2.1 of the License, or (at your option) any later version. | |
10 | ||
11 | # The GNU C Library is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | # Lesser General Public License for more details. | |
15 | ||
16 | # You should have received a copy of the GNU Lesser General Public | |
17 | # License along with the GNU C Library; if not, see | |
18 | # <http://www.gnu.org/licenses/>. | |
f5f52655 | 19 | |
57c69bef DL |
20 | set -e |
21 | ||
f5f52655 | 22 | common_objpfx=$1; shift |
740b3dbe | 23 | test_program_prefix=$1; shift |
f5f52655 UD |
24 | lang=$* |
25 | ||
26 | id=${PPID:-100} | |
27 | here=`pwd` | |
28 | ||
f5f52655 UD |
29 | # Run collation tests. |
30 | status=0 | |
31 | for l in $lang; do | |
ca41028b | 32 | here=0 |
f5f52655 | 33 | cns=`echo $l | sed 's/\(.*\)[.][^.]*/\1/'` |
07dab0c3 | 34 | LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}/iconvdata \ |
740b3dbe | 35 | LC_ALL=$l ${test_program_prefix} \ |
14e9dd67 | 36 | ${common_objpfx}localedata/collate-test $id < $cns.in \ |
ca41028b UD |
37 | > ${common_objpfx}localedata/$cns.out || here=1 |
38 | cmp -s $cns.in ${common_objpfx}localedata/$cns.out || here=1 | |
973fcec8 UD |
39 | if test $here -eq 0; then |
40 | echo "$l collate-test OK" | |
41 | else | |
42 | echo "$l collate-test FAIL" | |
43 | diff -u $cns.in ${common_objpfx}localedata/$cns.out | sed 's/^/ /' | |
44 | status=1 | |
45 | fi | |
f5f52655 | 46 | |
07dab0c3 | 47 | LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}/iconvdata \ |
740b3dbe | 48 | LC_ALL=$l ${test_program_prefix} \ |
14e9dd67 | 49 | ${common_objpfx}localedata/xfrm-test $id < $cns.in \ |
ca41028b UD |
50 | > ${common_objpfx}localedata/$cns.xout || here=1 |
51 | cmp -s $cns.in ${common_objpfx}localedata/$cns.xout || here=1 | |
52 | if test $here -eq 0; then | |
973fcec8 | 53 | echo "$l xfrm-test OK" |
ca41028b | 54 | else |
973fcec8 UD |
55 | echo "$l xfrm-test FAIL" |
56 | diff -u $cns.in ${common_objpfx}localedata/$cns.xout | sed 's/^/ /' | |
ca41028b UD |
57 | status=1 |
58 | fi | |
f5f52655 UD |
59 | done |
60 | ||
61 | exit $status | |
62 | # Local Variables: | |
39e16978 | 63 | # mode:shell-script |
f5f52655 | 64 | # End: |