Module Name: src
Committed By: rillig
Date: Thu May 11 18:36:36 UTC 2023
Modified Files:
src/tests/usr.bin/indent: lsym_preprocessing.c
Log Message:
tests/indent: test multi-line comments in preprocessing lines
To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/tests/usr.bin/indent/lsym_preprocessing.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/usr.bin/indent/lsym_preprocessing.c
diff -u src/tests/usr.bin/indent/lsym_preprocessing.c:1.5 src/tests/usr.bin/indent/lsym_preprocessing.c:1.6
--- src/tests/usr.bin/indent/lsym_preprocessing.c:1.5 Sun Apr 24 10:36:37 2022
+++ src/tests/usr.bin/indent/lsym_preprocessing.c Thu May 11 18:36:36 2023
@@ -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