1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22: common_objpfx=$1
23: tst_rpmatch=$2
24:
25: rc=0
26: while IFS=\& read locale string result dummy; do
27: if [ "$locale" != "#" ]; then
28: LOCPATH=${common_objpfx}localedata \
29: GCONV_PATH=${common_objpfx}/iconvdata \
30: ${tst_rpmatch} $locale $string $result \
31: || { echo "$locale $string $result FAILED"; exit 1; }
32: fi
33: done <<EOF
34: #& These are the tests for rpmatch in glibc. Each line contains one test,
35: #& comments start with #& in the first column. The fields are separated
36: #& by ampersand signs and contain: the locale, the string, the expected
37: #& return value of rpmatch(3). If the test fails, test-rpmatch prints
38: #& all these informations
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&yeS&1
47: C&No&0
48: C&no&0
49: #& Uh, that's nonsense
50: C&nonsens&0
51: C&Error&-1
52: de_DE.ISO-8859-1&Yes&1
53: de_DE.ISO-8859-1&Ja&1
54: de_DE.ISO-8859-1&Jammerschade&1
55: de_DE.ISO-8859-1&dejavu&-1
56: de_DE.ISO-8859-1&Nein&0
57: de_DE.ISO-8859-1&Fehler&-1
58: de_DE.ISO-8859-1&jein&1
59: EOF