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: comments with trailing wh...



details:   https://anonhg.NetBSD.org/src/rev/75846e4f8d5b
branches:  trunk
changeset: 376248:75846e4f8d5b
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Jun 06 05:39:49 2023 +0000

description:
tests/indent: comments with trailing whitespace may fit in a single line

diffstat:

 tests/usr.bin/indent/lsym_comment.c |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (35 lines):

diff -r 5cdd452a9aca -r 75846e4f8d5b tests/usr.bin/indent/lsym_comment.c
--- a/tests/usr.bin/indent/lsym_comment.c       Tue Jun 06 05:27:56 2023 +0000
+++ b/tests/usr.bin/indent/lsym_comment.c       Tue Jun 06 05:39:49 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lsym_comment.c,v 1.16 2023/06/05 08:22:00 rillig Exp $ */
+/* $NetBSD: lsym_comment.c,v 1.17 2023/06/06 05:39:49 rillig Exp $ */
 
 /*
  * Tests for the token lsym_comment, which starts a comment.
@@ -371,6 +371,25 @@ tab1+++    tab2--- tab3+++ tab4--- tab5+++ 
 
 
 /*
+ * TODO: Trailing whitespace in a comment is ignored when determining whether the
+ * comment fits in a single line.
+ */
+//indent input
+/* 456789 123456789 123456789 12345            */
+/* 456789 123456789 123456789 123456           */
+//indent end
+
+//indent run -l38
+/*
+ * 456789 123456789 123456789 12345
+ */
+/*
+ * 456789 123456789 123456789 123456
+ */
+//indent end
+
+
+/*
  * The following comments test line breaking when the comment does not end
  * with a space. Since indent adds a trailing space to a single-line comment,
  * this space has to be taken into account when computing the line length.



Home | Main Index | Thread Index | Old Index