Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/indent tests/indent: test multi-line comments ...
details: https://anonhg.NetBSD.org/src/rev/c906b0d55ccf
branches: trunk
changeset: 374768:c906b0d55ccf
user: rillig <rillig%NetBSD.org@localhost>
date: Thu May 11 18:36:36 2023 +0000
description:
tests/indent: test multi-line comments in preprocessing lines
diffstat:
tests/usr.bin/indent/lsym_preprocessing.c | 32 ++++++++++++++++++++++++++++++-
1 files changed, 31 insertions(+), 1 deletions(-)
diffs (43 lines):
diff -r 9a13eb67a77e -r c906b0d55ccf tests/usr.bin/indent/lsym_preprocessing.c
--- a/tests/usr.bin/indent/lsym_preprocessing.c Thu May 11 18:26:56 2023 +0000
+++ b/tests/usr.bin/indent/lsym_preprocessing.c Thu May 11 18:36:36 2023 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index