]> git.ipfire.org Git - thirdparty/glibc.git/blame - localedata/tst-rpmatch.sh
Remove "Contributed by" lines
[thirdparty/glibc.git] / localedata / tst-rpmatch.sh
CommitLineData
48d0341c 1#!/bin/sh -f
3db52d94 2#
2b778ceb 3# Copyright (C) 1998-2021 Free Software Foundation, Inc.
3db52d94
UD
4# This file is part of the GNU C Library and contains tests for
5# the rpmatch(3)-implementation.
3db52d94
UD
6
7# This program is free software; you can redistribute it and/or modify
8# it under the terms of the GNU General Public License as published by
9# the Free Software Foundation; either version 2, or (at your option)
10# any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU General Public License for more details.
16#
17# You should have received a copy of the GNU General Public License
5a82c748 18# along with this program; if not, see <https://www.gnu.org/licenses/>.
3db52d94 19
57c69bef
DL
20set -e
21
3db52d94 22common_objpfx=$1
9f835f5f
UD
23tst_rpmatch=$2
24
3db52d94 25rc=0
9f835f5f 26while IFS=\& read locale string result dummy; do
3db52d94 27 if [ "$locale" != "#" ]; then
6fb54a22 28 ${tst_rpmatch} $locale $string $result < /dev/null \
ca41028b 29 || { echo "$locale $string $result FAILED"; exit 1; }
3db52d94
UD
30 fi
31done <<EOF
e69dbc25 32#& These are the tests for rpmatch in glibc. Each line contains one test,
49c091e5 33#& comments start with #& in the first column. The fields are separated
ca41028b 34#& by ampersand signs and contain: the locale, the string, the expected
e69dbc25
UD
35#& return value of rpmatch(3). If the test fails, test-rpmatch prints
36#& all these informations
37C&Yes&1
38C&yes&1
39C&YES&1
40C&YeS&1
41C&YEs&1
42C&yEs&1
43C&yES&1
44C&yeS&1
45C&No&0
46C&no&0
47#& Uh, that's nonsense
48C&nonsens&0
49C&Error&-1
040cf4ba
UD
50de_DE.ISO-8859-1&Yes&1
51de_DE.ISO-8859-1&Ja&1
52de_DE.ISO-8859-1&Jammerschade&1
53de_DE.ISO-8859-1&dejavu&-1
54de_DE.ISO-8859-1&Nein&0
55de_DE.ISO-8859-1&Fehler&-1
56de_DE.ISO-8859-1&jein&1
3db52d94 57EOF