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/99da3d4a8bd9
branches:  trunk
changeset: 375885:99da3d4a8bd9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri May 19 07:05:26 2023 +0000

description:
tests/indent: test multi-line comments with -ncdb

diffstat:

 tests/usr.bin/indent/opt_cdb.c |  29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r 9d08e62a4c28 -r 99da3d4a8bd9 tests/usr.bin/indent/opt_cdb.c
--- a/tests/usr.bin/indent/opt_cdb.c    Fri May 19 06:50:07 2023 +0000
+++ b/tests/usr.bin/indent/opt_cdb.c    Fri May 19 07:05:26 2023 +0000
@@ -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



Home | Main Index | Thread Index | Old Index