Home | History | Annotate | Line # | Download | only in indent
opt_bap.c revision 1.6
      1 /* $NetBSD: opt_bap.c,v 1.6 2022/04/24 09:04:12 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
     16 static void one_liner(void){}
     17 static void several_lines(void)
     18 {
     19 	action();
     20 }
     21 int main(void){}
     22 int global_variable;
     23 
     24 void already_has_blank_line_below(void)
     25 {
     26 }
     27 
     28 void has_several_blank_lines_below(void)
     29 {
     30 }
     31 
     32 
     33 
     34 int		the_end;
     35 //indent end
     36 
     37 //indent run -bap
     38 static void
     39 one_liner(void)
     40 {
     41 }
     42 /* $ FIXME: needs a blank line here */
     43 static void
     44 several_lines(void)
     45 {
     46 	action();
     47 }
     48 /* $ FIXME: needs a blank line here */
     49 int
     50 main(void)
     51 {
     52 }
     53 /* $ FIXME: needs a blank line here */
     54 int		global_variable;
     55 
     56 void
     57 already_has_blank_line_below(void)
     58 {
     59 }
     60 
     61 void
     62 has_several_blank_lines_below(void)
     63 {
     64 }
     65 
     66 
     67 
     68 int		the_end;
     69 //indent end
     70 
     71 //indent run-equals-prev-output -nbap
     72