malloc: Fix transposed arguments in sysmalloc_mmap_fallback call
[glibc.git] / localedata / tst-rpmatch.sh
blob4cecbcd1e95b35c60e2a5a24caaca16fdaa2e694
1 #!/bin/sh -f
3 # Copyright (C) 1998-2023 Free Software Foundation, Inc.
4 # This file is part of the GNU C Library and contains tests for
5 # the rpmatch(3)-implementation.
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.
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.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, see <https://www.gnu.org/licenses/>.
20 set -e
22 common_objpfx=$1
23 tst_rpmatch=$2
25 rc=0
26 while IFS=\& read locale string result dummy; do
27 if [ "$locale" != "#" ]; then
28 ${tst_rpmatch} $locale $string $result < /dev/null \
29 || { echo "$locale $string $result FAILED"; exit 1; }
31 done <<EOF
32 #& These are the tests for rpmatch in glibc. Each line contains one test,
33 #& comments start with #& in the first column. The fields are separated
34 #& by ampersand signs and contain: the locale, the string, the expected
35 #& return value of rpmatch(3). If the test fails, test-rpmatch prints
36 #& all these informations
37 C&Yes&1
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&No&0
46 C&no&0
47 #& Uh, that's nonsense
48 C&nonsens&0
49 C&Error&-1
50 de_DE.ISO-8859-1&Yes&1
51 de_DE.ISO-8859-1&Ja&1
52 de_DE.ISO-8859-1&Jammerschade&1
53 de_DE.ISO-8859-1&dejavu&-1
54 de_DE.ISO-8859-1&Nein&0
55 de_DE.ISO-8859-1&Fehler&-1
56 de_DE.ISO-8859-1&jein&1
57 EOF