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 indent: test block comments and the -bb...



details:   https://anonhg.NetBSD.org/src/rev/0bd32604073a
branches:  trunk
changeset: 376445:0bd32604073a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jun 18 07:29:36 2023 +0000

description:
indent: test block comments and the -bbb option

diffstat:

 tests/usr.bin/indent/opt_bbb.c |  21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diffs (44 lines):

diff -r 639340dcf91a -r 0bd32604073a tests/usr.bin/indent/opt_bbb.c
--- a/tests/usr.bin/indent/opt_bbb.c    Sun Jun 18 07:10:24 2023 +0000
+++ b/tests/usr.bin/indent/opt_bbb.c    Sun Jun 18 07:29:36 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_bbb.c,v 1.9 2023/06/17 22:09:24 rillig Exp $ */
+/* $NetBSD: opt_bbb.c,v 1.10 2023/06/18 07:29:36 rillig Exp $ */
 
 /*
  * Tests for the options '-bbb' and '-nbbb'.
@@ -71,8 +71,15 @@ function_definition(void)
 {
 label:                         /* not a block comment */
        stmt;                   /* not a block comment */
+label: /*
+        * This is not a block comment, as it goes to the right.
+        */
+       stmt;                   /*
+                                * This is not a block comment, as it goes to
+                                * the right.
+                                */
        /**
-        * block comment
+        * This is a block comment.
         */
 }
 //indent end
@@ -82,8 +89,16 @@ label:                               /* not a block comment */
 label:                         /* not a block comment */
        stmt;                   /* not a block comment */
 
+// $ TODO: No blank line before this comment.
+label:                         /* This is not a block comment, as it goes to
+                                * the right. */
+
+// $ TODO: No blank line before this comment.
+       stmt;                   /* This is not a block comment, as it goes to
+                                * the right. */
+
        /**
-        * block comment
+        * This is a block comment.
         */
 }
 //indent end



Home | Main Index | Thread Index | Old Index