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