tests/indent: add test for preprocessor linesdiff -r1.1 -r1.2 src/tests/usr.bin/indent/token-preprocessing.0
(rillig)
--- src/tests/usr.bin/indent/Attic/token-preprocessing.0 2021/03/12 00:13:06 1.1
+++ src/tests/usr.bin/indent/Attic/token-preprocessing.0 2021/03/12 22:53:18 1.2
@@ -1,13 +1,28 @@ | @@ -1,13 +1,28 @@ | |||
1 | /* $NetBSD: token-preprocessing.0,v 1.1 2021/03/12 00:13:06 rillig Exp $ */ | 1 | /* $NetBSD: token-preprocessing.0,v 1.2 2021/03/12 22:53:18 rillig Exp $ */ | |
2 | /* $FreeBSD$ */ | 2 | /* $FreeBSD$ */ | |
3 | 3 | |||
4 | /*- | 4 | /*- | |
5 | * Tests for indenting preprocessing directives: | 5 | * Tests for indenting preprocessing directives: | |
6 | * | 6 | * | |
7 | * #define | 7 | * #define | |
8 | * #ifdef | 8 | * #ifdef | |
9 | * #pragma | 9 | * #pragma | |
10 | * #line | 10 | * #line | |
11 | */ | 11 | */ | |
12 | 12 | |||
13 | /* TODO: Add some code to be formatted. */ | 13 | #include <system-header.h> | |
14 | #include "local-header.h" | |||
15 | ||||
16 | #if 0 | |||
17 | #else | |||
18 | #endif | |||
19 | ||||
20 | #if 0 /* if comment */ | |||
21 | #else /* else comment */ | |||
22 | #endif /* endif comment */ | |||
23 | ||||
24 | #if 0 /* outer if comment */ | |||
25 | # if nested /* inner if comment */ | |||
26 | # else /* inner else comment */ | |||
27 | # endif /* inner endif comment */ | |||
28 | #endif /* outer endif comment */ |
--- src/tests/usr.bin/indent/Attic/token-preprocessing.0.stdout 2021/03/12 00:13:06 1.1
+++ src/tests/usr.bin/indent/Attic/token-preprocessing.0.stdout 2021/03/12 22:53:18 1.2
@@ -1,13 +1,29 @@ | @@ -1,13 +1,29 @@ | |||
1 | /* $NetBSD: token-preprocessing.0.stdout,v 1.1 2021/03/12 00:13:06 rillig Exp $ */ | 1 | /* $NetBSD: token-preprocessing.0.stdout,v 1.2 2021/03/12 22:53:18 rillig Exp $ */ | |
2 | /* $FreeBSD$ */ | 2 | /* $FreeBSD$ */ | |
3 | 3 | |||
4 | /*- | 4 | /*- | |
5 | * Tests for indenting preprocessing directives: | 5 | * Tests for indenting preprocessing directives: | |
6 | * | 6 | * | |
7 | * #define | 7 | * #define | |
8 | * #ifdef | 8 | * #ifdef | |
9 | * #pragma | 9 | * #pragma | |
10 | * #line | 10 | * #line | |
11 | */ | 11 | */ | |
12 | 12 | |||
13 | /* TODO: Add some code to be formatted. */ | 13 | #include <system-header.h> | |
14 | #include "local-header.h" | |||
15 | ||||
16 | #if 0 | |||
17 | #else | |||
18 | #endif | |||
19 | ||||
20 | #if 0 /* if comment */ | |||
21 | #else /* else comment */ | |||
22 | #endif /* endif comment */ | |||
23 | ||||
24 | #if 0 /* outer if comment */ | |||
25 | /* $ XXX: The indentation is removed, which can get confusing */ | |||
26 | #if nested /* inner if comment */ | |||
27 | #else /* inner else comment */ | |||
28 | #endif /* inner endif comment */ | |||
29 | #endif /* outer endif comment */ |