Update.
[glibc.git] / localedata / tst-rpmatch.sh
blob7718b54aaf4343faba5163b675284da8b0a83cd4
1 #! /bin/sh -f
3 # Copyright (C) 1998 Free Software Foundation, Inc.
4 # This file is part of the GNU C Library and contains tests for
5 # the rpmatch(3)-implementation.
6 # contributed by Jochen Hein <jochen.hein@delphi.central.de>
8 # This program is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 2, or (at your option)
11 # any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 common_objpfx=$1
23 IFS="§"
24 rc=0
25 while read locale string result dummy; do
26 if [ "$locale" != "#" ]; then
27 LOCPATH=${common_objpfx}localedata \
28 ${common_objpfx}elf/ld.so --library-path $common_objpfx \
29 ${common_objpfx}localedata/tst-rpmatch $locale $string $result \
30 || exit 1
32 done <<EOF
33 #§ These are the tests for rpmatch in glibc. Each line contains one test,
34 #§ comments start with #§ in the first column. The fields are seperated
35 #§ by paragraph signs and contain: the locale, the string, the expected
36 #§ return value of rpmatch(3). If the test fails, test-rpmatch prints
37 #§ all these informations
38 C§Yes§1
39 C§yes§1
40 C§YES§1
41 C§YeS§1
42 C§YEs§1
43 C§yEs§1
44 C§yES§1
45 C§yeS§1
46 C§No§0
47 C§no§0
48 #§ Uh, that's nonsense
49 C§nonsens§0
50 C§Error§-1
51 de_DE§Yes§1
52 de_DE§Ja§1
53 de_DE§Jammerschade§1
54 de_DE§dejavu§-1
55 de_DE§Nein§0
56 de_DE§Fehler§-1
57 de_DE§jein§1
58 EOF
60 rc=$?
61 if [ $rc -eq 1 ]; then
62 echo "Errors"
64 exit $rc