opt_bap.c revision 1.5
1/* $NetBSD: opt_bap.c,v 1.5 2022/04/22 21:21:20 rillig Exp $ */
2
3/*
4 * Tests for the options '-bap' and '-nbap' ("blank line after procedure
5 * body").
6 *
7 * The option '-bap' forces a blank line after every function body.
8 *
9 * The option '-nbap' keeps everything as is.
10 *
11 * FIXME: These options don't have any effect since at least 2000.
12 * TODO: Investigate how nobody could have noticed this for 20 years.
13 */
14
15#indent input
16static void one_liner(void){}
17static void several_lines(void)
18{
19	action();
20}
21int main(void){}
22int global_variable;
23
24void already_has_blank_line_below(void)
25{
26}
27
28void has_several_blank_lines_below(void)
29{
30}
31
32
33
34int		the_end;
35#indent end
36
37#indent run -bap
38static void
39one_liner(void)
40{
41}
42/* $ FIXME: needs a blank line here */
43static void
44several_lines(void)
45{
46	action();
47}
48/* $ FIXME: needs a blank line here */
49int
50main(void)
51{
52}
53/* $ FIXME: needs a blank line here */
54int		global_variable;
55
56void
57already_has_blank_line_below(void)
58{
59}
60
61void
62has_several_blank_lines_below(void)
63{
64}
65
66
67
68int		the_end;
69#indent end
70
71#indent run-equals-prev-output -nbap
72