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: demonstrate spaces around...



details:   https://anonhg.NetBSD.org/src/rev/c4ef0d13915f
branches:  trunk
changeset: 988677:c4ef0d13915f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Oct 08 23:53:37 2021 +0000

description:
tests/indent: demonstrate spaces around comment

diffstat:

 tests/usr.bin/indent/token-comment.0        |  10 +++++++++-
 tests/usr.bin/indent/token-comment.0.stdout |  13 ++++++++++++-
 2 files changed, 21 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r 6e9615de7a85 -r c4ef0d13915f tests/usr.bin/indent/token-comment.0
--- a/tests/usr.bin/indent/token-comment.0      Fri Oct 08 23:47:40 2021 +0000
+++ b/tests/usr.bin/indent/token-comment.0      Fri Oct 08 23:53:37 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token-comment.0,v 1.6 2021/10/08 22:11:26 rillig Exp $ */
+/* $NetBSD: token-comment.0,v 1.7 2021/10/08 23:53:37 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -151,3 +151,11 @@
                lines without asterisks.
 
  */
+
+void loop(void)
+{
+while(cond)/*comment*/;
+
+       while(cond)
+       /*comment*/;
+}
diff -r 6e9615de7a85 -r c4ef0d13915f tests/usr.bin/indent/token-comment.0.stdout
--- a/tests/usr.bin/indent/token-comment.0.stdout       Fri Oct 08 23:47:40 2021 +0000
+++ b/tests/usr.bin/indent/token-comment.0.stdout       Fri Oct 08 23:53:37 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token-comment.0.stdout,v 1.7 2021/10/08 22:11:26 rillig Exp $ */
+/* $NetBSD: token-comment.0.stdout,v 1.8 2021/10/08 23:53:37 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -160,3 +160,14 @@
  * There may also be lines without asterisks.
  *
  */
+
+void
+loop(void)
+{
+       while (cond)            /* comment */
+               ;
+
+       while (cond)
+/* $ XXX: The spaces around the comment look unintentional. */
+                /* comment */ ;
+}



Home | Main Index | Thread Index | Old Index