Update.
[glibc/history.git] / stdlib / tst-fmtmsg.sh
blobc8319c1f40f1494927c70ec3f3e4efac7e734070
1 #! /bin/sh
2 # Test of fmtmsg function family.
3 # Copyright (C) 2000, 2001 Free Software Foundation, Inc.
4 # This file is part of the GNU C Library.
7 # The GNU C Library is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU Lesser General Public
9 # License as published by the Free Software Foundation; either
10 # version 2.1 of the License, or (at your option) any later version.
12 # The GNU C Library 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 GNU
15 # Lesser General Public License for more details.
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with the GNU C Library; if not, write to the Free
19 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20 # 02111-1307 USA.
22 common_objpfx=$1
23 run_program_prefix=$2
24 objpfx=$3
26 test="${run_program_prefix} ${objpfx}tst-fmtmsg"
27 out=${objpfx}tst-fmtmsg.out
29 LC_ALL=C
30 export LC_ALL
32 (MSGVERB= $test || exit 1;
33 MSGVERB=label $test || exit 1;
34 MSGVERB=severity $test || exit 1;
35 MSGVERB=severity:label $test || exit 1;
36 MSGVERB=text $test || exit 1;
37 MSGVERB=text:label $test || exit 1;
38 MSGVERB=text:severity $test || exit 1;
39 MSGVERB=text:severity:label $test || exit 1;
40 MSGVERB=action $test || exit 1;
41 MSGVERB=action:label $test || exit 1;
42 MSGVERB=action:severity $test || exit 1;
43 MSGVERB=action:severity:label $test || exit 1;
44 MSGVERB=action:text $test || exit 1;
45 MSGVERB=action:text:label $test || exit 1;
46 MSGVERB=action:text:severity $test || exit 1;
47 MSGVERB=action:text:severity:label $test || exit 1;
48 MSGVERB=tag $test || exit 1;
49 MSGVERB=tag:label $test || exit 1;
50 MSGVERB=tag:severity $test || exit 1;
51 MSGVERB=tag:severity:label $test || exit 1;
52 MSGVERB=tag:text $test || exit 1;
53 MSGVERB=tag:text:label $test || exit 1;
54 MSGVERB=tag:text:severity $test || exit 1;
55 MSGVERB=tag:text:severity:label $test || exit 1;
56 MSGVERB=tag:action $test || exit 1;
57 MSGVERB=tag:action:label $test || exit 1;
58 MSGVERB=tag:action:severity $test || exit 1;
59 MSGVERB=tag:action:severity:label $test || exit 1;
60 MSGVERB=tag:action:text $test || exit 1;
61 MSGVERB=tag:action:text:label $test || exit 1;
62 MSGVERB=tag:action:text:severity $test || exit 1;
63 MSGVERB=tag:action:text:severity:label $test || exit 1;) 2> $out
65 cmp $out <<EOF
66 GLIBC:tst-fmtmsg: HALT: halt
67 TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
68 GLIBC:tst-fmtmsg: ERROR: halt
69 TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
70 GLIBC:tst-fmtmsg: WARNING: halt
71 TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
72 GLIBC:tst-fmtmsg: INFO: halt
73 TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
74 GLIBC:tst-fmtmsg: halt
75 TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
76 GLIBC:tst-fmtmsg: TEST: halt
77 TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
78 GLIBC:tst-fmtmsg
79 GLIBC:tst-fmtmsg
80 GLIBC:tst-fmtmsg
81 GLIBC:tst-fmtmsg
82 GLIBC:tst-fmtmsg
83 GLIBC:tst-fmtmsg
84 HALT
85 ERROR
86 WARNING
87 INFO
89 TEST
90 GLIBC:tst-fmtmsg: HALT
91 GLIBC:tst-fmtmsg: ERROR
92 GLIBC:tst-fmtmsg: WARNING
93 GLIBC:tst-fmtmsg: INFO
94 GLIBC:tst-fmtmsg
95 GLIBC:tst-fmtmsg: TEST
96 halt
97 halt
98 halt
99 halt
100 halt
101 halt
102 GLIBC:tst-fmtmsg: halt
103 GLIBC:tst-fmtmsg: halt
104 GLIBC:tst-fmtmsg: halt
105 GLIBC:tst-fmtmsg: halt
106 GLIBC:tst-fmtmsg: halt
107 GLIBC:tst-fmtmsg: halt
108 HALT: halt
109 ERROR: halt
110 WARNING: halt
111 INFO: halt
112 halt
113 TEST: halt
114 GLIBC:tst-fmtmsg: HALT: halt
115 GLIBC:tst-fmtmsg: ERROR: halt
116 GLIBC:tst-fmtmsg: WARNING: halt
117 GLIBC:tst-fmtmsg: INFO: halt
118 GLIBC:tst-fmtmsg: halt
119 GLIBC:tst-fmtmsg: TEST: halt
120 TO FIX: should print message for MM_HALT
121 TO FIX: should print message for MM_ERROR
122 TO FIX: should print message for MM_WARNING
123 TO FIX: should print message for MM_INFO
124 TO FIX: should print message for MM_NOSEV
125 TO FIX: should print message for MM_TEST
126 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_HALT
127 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_ERROR
128 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_WARNING
129 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_INFO
130 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_NOSEV
131 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_TEST
132 HALT: TO FIX: should print message for MM_HALT
133 ERROR: TO FIX: should print message for MM_ERROR
134 WARNING: TO FIX: should print message for MM_WARNING
135 INFO: TO FIX: should print message for MM_INFO
136 TO FIX: should print message for MM_NOSEV
137 TEST: TO FIX: should print message for MM_TEST
138 GLIBC:tst-fmtmsg: HALT: TO FIX: should print message for MM_HALT
139 GLIBC:tst-fmtmsg: ERROR: TO FIX: should print message for MM_ERROR
140 GLIBC:tst-fmtmsg: WARNING: TO FIX: should print message for MM_WARNING
141 GLIBC:tst-fmtmsg: INFO: TO FIX: should print message for MM_INFO
142 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_NOSEV
143 GLIBC:tst-fmtmsg: TEST: TO FIX: should print message for MM_TEST
144 halt
145 TO FIX: should print message for MM_HALT
146 halt
147 TO FIX: should print message for MM_ERROR
148 halt
149 TO FIX: should print message for MM_WARNING
150 halt
151 TO FIX: should print message for MM_INFO
152 halt
153 TO FIX: should print message for MM_NOSEV
154 halt
155 TO FIX: should print message for MM_TEST
156 GLIBC:tst-fmtmsg: halt
157 TO FIX: should print message for MM_HALT
158 GLIBC:tst-fmtmsg: halt
159 TO FIX: should print message for MM_ERROR
160 GLIBC:tst-fmtmsg: halt
161 TO FIX: should print message for MM_WARNING
162 GLIBC:tst-fmtmsg: halt
163 TO FIX: should print message for MM_INFO
164 GLIBC:tst-fmtmsg: halt
165 TO FIX: should print message for MM_NOSEV
166 GLIBC:tst-fmtmsg: halt
167 TO FIX: should print message for MM_TEST
168 HALT: halt
169 TO FIX: should print message for MM_HALT
170 ERROR: halt
171 TO FIX: should print message for MM_ERROR
172 WARNING: halt
173 TO FIX: should print message for MM_WARNING
174 INFO: halt
175 TO FIX: should print message for MM_INFO
176 halt
177 TO FIX: should print message for MM_NOSEV
178 TEST: halt
179 TO FIX: should print message for MM_TEST
180 GLIBC:tst-fmtmsg: HALT: halt
181 TO FIX: should print message for MM_HALT
182 GLIBC:tst-fmtmsg: ERROR: halt
183 TO FIX: should print message for MM_ERROR
184 GLIBC:tst-fmtmsg: WARNING: halt
185 TO FIX: should print message for MM_WARNING
186 GLIBC:tst-fmtmsg: INFO: halt
187 TO FIX: should print message for MM_INFO
188 GLIBC:tst-fmtmsg: halt
189 TO FIX: should print message for MM_NOSEV
190 GLIBC:tst-fmtmsg: TEST: halt
191 TO FIX: should print message for MM_TEST
192 GLIBC:tst-fmtmsg:1
193 GLIBC:tst-fmtmsg:2
194 GLIBC:tst-fmtmsg:3
195 GLIBC:tst-fmtmsg:4
196 GLIBC:tst-fmtmsg:5
197 GLIBC:tst-fmtmsg:6
198 GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:1
199 GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:2
200 GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:3
201 GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:4
202 GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:5
203 GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:6
204 HALT: GLIBC:tst-fmtmsg:1
205 ERROR: GLIBC:tst-fmtmsg:2
206 WARNING: GLIBC:tst-fmtmsg:3
207 INFO: GLIBC:tst-fmtmsg:4
208 GLIBC:tst-fmtmsg:5
209 TEST: GLIBC:tst-fmtmsg:6
210 GLIBC:tst-fmtmsg: HALT: GLIBC:tst-fmtmsg:1
211 GLIBC:tst-fmtmsg: ERROR: GLIBC:tst-fmtmsg:2
212 GLIBC:tst-fmtmsg: WARNING: GLIBC:tst-fmtmsg:3
213 GLIBC:tst-fmtmsg: INFO: GLIBC:tst-fmtmsg:4
214 GLIBC:tst-fmtmsg: GLIBC:tst-fmtmsg:5
215 GLIBC:tst-fmtmsg: TEST: GLIBC:tst-fmtmsg:6
216 halt
217 GLIBC:tst-fmtmsg:1
218 halt
219 GLIBC:tst-fmtmsg:2
220 halt
221 GLIBC:tst-fmtmsg:3
222 halt
223 GLIBC:tst-fmtmsg:4
224 halt
225 GLIBC:tst-fmtmsg:5
226 halt
227 GLIBC:tst-fmtmsg:6
228 GLIBC:tst-fmtmsg: halt
229 GLIBC:tst-fmtmsg:1
230 GLIBC:tst-fmtmsg: halt
231 GLIBC:tst-fmtmsg:2
232 GLIBC:tst-fmtmsg: halt
233 GLIBC:tst-fmtmsg:3
234 GLIBC:tst-fmtmsg: halt
235 GLIBC:tst-fmtmsg:4
236 GLIBC:tst-fmtmsg: halt
237 GLIBC:tst-fmtmsg:5
238 GLIBC:tst-fmtmsg: halt
239 GLIBC:tst-fmtmsg:6
240 HALT: halt
241 GLIBC:tst-fmtmsg:1
242 ERROR: halt
243 GLIBC:tst-fmtmsg:2
244 WARNING: halt
245 GLIBC:tst-fmtmsg:3
246 INFO: halt
247 GLIBC:tst-fmtmsg:4
248 halt
249 GLIBC:tst-fmtmsg:5
250 TEST: halt
251 GLIBC:tst-fmtmsg:6
252 GLIBC:tst-fmtmsg: HALT: halt
253 GLIBC:tst-fmtmsg:1
254 GLIBC:tst-fmtmsg: ERROR: halt
255 GLIBC:tst-fmtmsg:2
256 GLIBC:tst-fmtmsg: WARNING: halt
257 GLIBC:tst-fmtmsg:3
258 GLIBC:tst-fmtmsg: INFO: halt
259 GLIBC:tst-fmtmsg:4
260 GLIBC:tst-fmtmsg: halt
261 GLIBC:tst-fmtmsg:5
262 GLIBC:tst-fmtmsg: TEST: halt
263 GLIBC:tst-fmtmsg:6
264 TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
265 TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
266 TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
267 TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
268 TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
269 TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
270 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
271 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
272 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
273 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
274 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
275 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
276 HALT: TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
277 ERROR: TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
278 WARNING: TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
279 INFO: TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
280 TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
281 TEST: TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
282 GLIBC:tst-fmtmsg: HALT: TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
283 GLIBC:tst-fmtmsg: ERROR: TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
284 GLIBC:tst-fmtmsg: WARNING: TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
285 GLIBC:tst-fmtmsg: INFO: TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
286 GLIBC:tst-fmtmsg: TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
287 GLIBC:tst-fmtmsg: TEST: TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
288 halt
289 TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
290 halt
291 TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
292 halt
293 TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
294 halt
295 TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
296 halt
297 TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
298 halt
299 TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
300 GLIBC:tst-fmtmsg: halt
301 TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
302 GLIBC:tst-fmtmsg: halt
303 TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
304 GLIBC:tst-fmtmsg: halt
305 TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
306 GLIBC:tst-fmtmsg: halt
307 TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
308 GLIBC:tst-fmtmsg: halt
309 TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
310 GLIBC:tst-fmtmsg: halt
311 TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
312 HALT: halt
313 TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
314 ERROR: halt
315 TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
316 WARNING: halt
317 TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
318 INFO: halt
319 TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
320 halt
321 TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
322 TEST: halt
323 TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
324 GLIBC:tst-fmtmsg: HALT: halt
325 TO FIX: should print message for MM_HALT GLIBC:tst-fmtmsg:1
326 GLIBC:tst-fmtmsg: ERROR: halt
327 TO FIX: should print message for MM_ERROR GLIBC:tst-fmtmsg:2
328 GLIBC:tst-fmtmsg: WARNING: halt
329 TO FIX: should print message for MM_WARNING GLIBC:tst-fmtmsg:3
330 GLIBC:tst-fmtmsg: INFO: halt
331 TO FIX: should print message for MM_INFO GLIBC:tst-fmtmsg:4
332 GLIBC:tst-fmtmsg: halt
333 TO FIX: should print message for MM_NOSEV GLIBC:tst-fmtmsg:5
334 GLIBC:tst-fmtmsg: TEST: halt
335 TO FIX: should print message for MM_TEST GLIBC:tst-fmtmsg:6
337 exit $?