diff options
| author | rillig <rillig@NetBSD.org> | 2023-05-11 18:36:36 +0000 |
|---|---|---|
| committer | rillig <rillig@NetBSD.org> | 2023-05-11 18:36:36 +0000 |
| commit | bbdcc926edbf66bbc140276cd4015a9ff1853f76 (patch) | |
| tree | da0f8598d4396f531ac305f473855b89c5f8bb62 /tests | |
| parent | 875b172dd78489ce9caf87b0380bd6179fba269c (diff) | |
tests/indent: test multi-line comments in preprocessing lines
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/usr.bin/indent/lsym_preprocessing.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/usr.bin/indent/lsym_preprocessing.c b/tests/usr.bin/indent/lsym_preprocessing.c index 645801a64a8..40fc1c371ec 100644 --- a/tests/usr.bin/indent/lsym_preprocessing.c +++ b/tests/usr.bin/indent/lsym_preprocessing.c @@ -1,4 +1,4 @@ -/* $NetBSD: lsym_preprocessing.c,v 1.5 2022/04/24 10:36:37 rillig Exp $ */ +/* $NetBSD: lsym_preprocessing.c,v 1.6 2023/05/11 18:36:36 rillig Exp $ */ /* * Tests for the token lsym_preprocessing, which represents a '#' that starts @@ -213,3 +213,33 @@ int unary_plus = #else /* comment */ #endif /* comment */ //indent end + + +/* + * Multi-line comments in preprocessing lines. + */ +//indent input +#define eol_comment // EOL + +#define wrap_comment /* line 1 + * line 2 + * line 3 + */ + +#define fixed_comment /*- line 1 + * line 2 + * line 3 + */ +//indent end + +//indent run +#define eol_comment // EOL + +#define wrap_comment /* line 1 line 2 line 3 */ + +/* $ FIXME: Keep the original indentation of the follow-up lines. */ +#define fixed_comment /*- line 1 + * line 2 + * line 3 + */ +//indent end |
