Module Name: src
Committed By: rillig
Date: Tue Jun 6 05:39:49 UTC 2023
Modified Files:
src/tests/usr.bin/indent: lsym_comment.c
Log Message:
tests/indent: comments with trailing whitespace may fit in a single line
To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/tests/usr.bin/indent/lsym_comment.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/lsym_comment.c
diff -u src/tests/usr.bin/indent/lsym_comment.c:1.16 src/tests/usr.bin/indent/lsym_comment.c:1.17
--- src/tests/usr.bin/indent/lsym_comment.c:1.16 Mon Jun 5 08:22:00 2023
+++ src/tests/usr.bin/indent/lsym_comment.c Tue Jun 6 05:39:49 2023
@@ -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.