xref: /netbsd-src/tests/usr.bin/indent/lsym_form_feed.c (revision c99fb69e7206fd9ba64de4fdc7e673aacd6b16da)
1 /* $NetBSD: lsym_form_feed.c,v 1.8 2023/05/21 10:18:44 rillig Exp $ */
2 
3 /*
4  * Tests for the token lsym_form_feed, which represents a form feed, a special
5  * kind of whitespace that is seldom used.  If it is used, it usually appears
6  * on a line of its own, after an external-declaration, to force a page break
7  * when printing the source code on actual paper.
8  */
9 
10 //indent input
11 void function_1(void);
12 
13 void function_2(void);
14 //indent end
15 
16 //indent run-equals-input -di0
17 
18 
19 /*
20  * Test form feed after 'if (expr)', even though it does not occur in practice.
21  */
22 //indent input
function(void)23 void function(void)
24 {
25 	if (expr)
26 	 /* <-- form feed */
27 	{
28 	}
29 }
30 //indent end
31 
32 //indent run
33 void
function(void)34 function(void)
35 {
36 	if (expr)
37 				/* <-- form feed */
38 	{
39 	}
40 }
41 //indent end
42