| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: lsym_rparen_or_rbracket.c,v 1.5 2023/06/15 09:19:07 rillig Exp $ */ | | 1 | /* $NetBSD: lsym_rparen_or_rbracket.c,v 1.6 2023/06/16 13:43:30 rillig Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Tests for the token lsym_rparen_or_lbracket, which represents ')' or ']', | | 4 | * Tests for the token lsym_rparen_or_lbracket, which represents ')' or ']', |
5 | * the counterparts for '(' and '['. | | 5 | * the counterparts for '(' and '['. |
6 | * | | 6 | * |
7 | * See also: | | 7 | * See also: |
8 | * lsym_lparen_or_lbracket.c | | 8 | * lsym_lparen_or_lbracket.c |
9 | */ | | 9 | */ |
10 | | | 10 | |
11 | //indent input | | 11 | //indent input |
12 | int var = (3); | | 12 | int var = (3); |
13 | int cast = (int)3; | | 13 | int cast = (int)3; |
14 | int cast = (int)(3); | | 14 | int cast = (int)(3); |
| @@ -44,13 +44,34 @@ int a = array[ | | | @@ -44,13 +44,34 @@ int a = array[ |
44 | //indent end | | 44 | //indent end |
45 | | | 45 | |
46 | //indent run -di0 -nlp | | 46 | //indent run -di0 -nlp |
47 | int a = array[ | | 47 | int a = array[ |
48 | 3 | | 48 | 3 |
49 | ]; | | 49 | ]; |
50 | { | | 50 | { |
51 | int a = array[ | | 51 | int a = array[ |
52 | 3 | | 52 | 3 |
53 | // $ FIXME: Should be one level to the left since it is the outermost bracket. | | 53 | // $ FIXME: Should be one level to the left since it is the outermost bracket. |
54 | ]; | | 54 | ]; |
55 | } | | 55 | } |
56 | //indent end | | 56 | //indent end |
| | | 57 | |
| | | 58 | |
| | | 59 | //indent input |
| | | 60 | { |
| | | 61 | dcs_align((u_int)dcs); |
| | | 62 | mpools.pools[i] = (memory_pool){NULL, 0, 0}; |
| | | 63 | list_add(l, (const char[3]){'-', (char)c, '\0'}); |
| | | 64 | } |
| | | 65 | //indent end |
| | | 66 | |
| | | 67 | //indent run -ci4 -di0 -nlp |
| | | 68 | { |
| | | 69 | // $ FIXME: No space after cast. |
| | | 70 | dcs_align((u_int) dcs); |
| | | 71 | // $ FIXME: Don't add newlines. |
| | | 72 | mpools.pools[i] = (memory_pool) { |
| | | 73 | NULL, 0, 0 |
| | | 74 | }; |
| | | 75 | list_add(l, (const char[3]){'-', (char)c, '\0'}); |
| | | 76 | } |
| | | 77 | //indent end |