1 | #include <fmtmsg.h> |
2 | #include <stdio.h> |
3 | |
4 | |
5 | static int |
6 | do_test (void) |
7 | { |
8 | /* Ugly, but fmtmsg would otherwise print to stderr which we do not |
9 | want. */ |
10 | fclose (stderr); |
11 | stderr = stdout; |
12 | |
13 | int e1; |
14 | e1 = fmtmsg (MM_PRINT, label: "label:part" , MM_WARNING, text: "text" , action: "action" , tag: "tag" ); |
15 | |
16 | int e2; |
17 | e2 = fmtmsg (MM_PRINT, label: "label2:part2" , severity: 11, text: "text2" , action: "action2" , tag: "tag2" ); |
18 | |
19 | addseverity (severity: 10, string: "additional severity" ); |
20 | |
21 | int e3; |
22 | e3 = fmtmsg (MM_PRINT, label: "label3:part3" , severity: 10, text: "text3" , action: "action3" , tag: "tag3" ); |
23 | |
24 | return e1 != 0 || e2 != 0 || e3 != 0; |
25 | } |
26 | |
27 | #define TEST_FUNCTION do_test () |
28 | #include "../test-skeleton.c" |
29 | |