blob: 963f7fdcfd08ca437f0a0886d10c7cc31b71c877 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
/* $NetBSD: opt_sc.c,v 1.8 2023/06/17 22:09:24 rillig Exp $ */
/*
* Tests for the options '-sc' and '-nsc'.
*
* The option '-sc' starts continuation lines of block comments with " * ".
*
* The option '-nsc' does not use asterisks for aligning the continuation
* lines of comments.
*/
//indent input
/* comment
without
asterisks
*/
//indent end
//indent run -sc
/*
* comment without asterisks
*/
//indent end
//indent run -nsc
/*
comment without asterisks
*/
//indent end
//indent input
/*
** This comment style is used by Lua.
*/
//indent end
//indent run -sc
/*
// $ XXX: The additional '*' is debatable.
* * This comment style is used by Lua.
*/
//indent end
//indent run -nsc
/*
// $ This comment, as rewritten by indent, is not actually used by Lua.
* This comment style is used by Lua.
*/
//indent end
/*
* Comments that start with '*' or '-' do not get modified at all.
*/
//indent input
/**
* Javadoc, adopted by several other programming languages.
*/
//indent end
//indent run-equals-input -sc
//indent run-equals-input -nsc
/*
* Ensure that blank lines in comments are preserved. Multiple adjacent blank
* lines are preserved as well.
*/
//indent input
/*
paragraph 1
paragraph 2
*/
//indent end
//indent run -sc
/*
* paragraph 1
*
*
* paragraph 2
*/
//indent end
//indent run -nsc
/*
// $ XXX: paragraph 1 is indented, paragraph 2 isn't.
paragraph 1
paragraph 2
*/
//indent end
|