Module Name:    src
Committed By:   rillig
Date:           Fri May 19 07:05:26 UTC 2023

Modified Files:
        src/tests/usr.bin/indent: opt_cdb.c

Log Message:
tests/indent: test multi-line comments with -ncdb


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/tests/usr.bin/indent/opt_cdb.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/opt_cdb.c
diff -u src/tests/usr.bin/indent/opt_cdb.c:1.8 src/tests/usr.bin/indent/opt_cdb.c:1.9
--- src/tests/usr.bin/indent/opt_cdb.c:1.8	Sun Apr 24 09:04:12 2022
+++ src/tests/usr.bin/indent/opt_cdb.c	Fri May 19 07:05:26 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_cdb.c,v 1.8 2022/04/24 09:04:12 rillig Exp $ */
+/* $NetBSD: opt_cdb.c,v 1.9 2023/05/19 07:05:26 rillig Exp $ */
 
 /*
  * Tests for the options '-cdb' and '-ncdb'.
@@ -198,3 +198,30 @@ example(void)
 /*
  * */
 //indent end
+
+
+/*
+ * Since 2019-04-04, the -ncdb option condenses multi-line comments as well,
+ * not only single-line comments.
+ *
+ * XXX: Is this intended?
+ */
+//indent input
+{
+	/*
+	 * This is the first paragraph.
+	 *
+	 * This is the second paragraph.
+	 */
+}
+//indent end
+
+//indent run-equals-input -cdb
+
+//indent run -ncdb
+{
+	/* This is the first paragraph.
+	 *
+	 * This is the second paragraph. */
+}
+//indent end

Reply via email to