summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ast/msgcc/msgcc.tst
blob: 101b05de5bf87d420a94fdc6cd632980c8b1bd3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# regression tests for the msgcc utility

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