da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin# regression tests for the msgcc utility
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chinTEST 01 'basics'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin EXEC -c t.c
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin NOTE 'pp:allpossible'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin INPUT t.c $'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #include <foo-bar.h>
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin void f(void)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #if 0
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin error(1, "foo bar");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #else
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin errormsg(locale, 2, "%s: bar foo");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #endif
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin }
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin '
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin OUTPUT t.mso $'str "foo bar"\nstr "%s: bar foo"'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin OUTPUT -
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin EXEC -Dfprintf=_STDIO_ -c t.c
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin NOTE 'ignore readonly redefinitions'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin INPUT t.c $'
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin #define stderr foo
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin void f(void)
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin {
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin fprintf(stderr, "foo bar");
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin }
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin '
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin OUTPUT t.mso $'str "foo bar"'