xref: /titanic_41/usr/src/cmd/ast/msgcc/msgcc.tst (revision ff3124eff995e6cd8ebd8c6543648e0670920034)
1# regression tests for the msgcc utility
2
3TEST 01 'basics'
4	EXEC -c t.c
5		NOTE 'pp:allpossible'
6		INPUT t.c $'
7			#include <foo-bar.h>
8			void f(void)
9			{
10			#if 0
11				error(1, "foo bar");
12			#else
13				errormsg(locale, 2, "%s: bar foo");
14			#endif
15			}
16		'
17		OUTPUT t.mso $'str "foo bar"\nstr "%s: bar foo"'
18		OUTPUT -
19	EXEC -Dfprintf=_STDIO_ -c t.c
20		NOTE 'ignore readonly redefinitions'
21		INPUT t.c $'
22			#define stderr foo
23			void f(void)
24			{
25				fprintf(stderr, "foo bar");
26			}
27		'
28		OUTPUT t.mso $'str "foo bar"'
29