18 if (addseverity (MM_TEST
, TEST
) != MM_OK
)
20 puts ("addseverity failed");
23 strcpy (TEST
, "TEST");
25 if (fmtmsg (MM_PRINT
, "GLIBC:tst-fmtmsg", MM_HALT
, "halt",
26 "should print message for MM_HALT", "GLIBC:tst-fmtmsg:1")
30 if (fmtmsg (MM_PRINT
, "GLIBC:tst-fmtmsg", MM_ERROR
, "halt",
31 "should print message for MM_ERROR", "GLIBC:tst-fmtmsg:2")
35 if (fmtmsg (MM_PRINT
, "GLIBC:tst-fmtmsg", MM_WARNING
, "halt",
36 "should print message for MM_WARNING", "GLIBC:tst-fmtmsg:3")
40 if (fmtmsg (MM_PRINT
, "GLIBC:tst-fmtmsg", MM_INFO
, "halt",
41 "should print message for MM_INFO", "GLIBC:tst-fmtmsg:4")
45 if (fmtmsg (MM_PRINT
, "GLIBC:tst-fmtmsg", MM_NOSEV
, "halt",
46 "should print message for MM_NOSEV", "GLIBC:tst-fmtmsg:5")
50 if (fmtmsg (MM_PRINT
, "GLIBC:tst-fmtmsg", MM_TEST
, "halt",
51 "should print message for MM_TEST", "GLIBC:tst-fmtmsg:6")
55 if (addseverity (MM_TEST
, NULL
) != MM_OK
)
57 puts ("second addseverity failed");
61 if (addseverity (MM_TEST
, NULL
) != MM_NOTOK
)
63 puts ("third addseverity unexpectedly succeeded");
67 char *p
= strdup ("TEST2");
68 if (addseverity (MM_TEST
, p
) != MM_OK
)
70 puts ("fourth addseverity failed");
73 if (addseverity (MM_TEST
, "TEST3") != MM_OK
)
75 puts ("fifth addseverity failed");