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: document how empty lines ...
details: https://anonhg.NetBSD.org/src/rev/6408560ce274
branches: trunk
changeset: 1024466:6408560ce274
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Oct 24 21:55:07 2021 +0000
description:
tests/indent: document how empty lines in box comments are handled
diffstat:
tests/usr.bin/indent/token_comment.c | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
diffs (28 lines):
diff -r ebb1dba389de -r 6408560ce274 tests/usr.bin/indent/token_comment.c
--- a/tests/usr.bin/indent/token_comment.c Sun Oct 24 21:48:16 2021 +0000
+++ b/tests/usr.bin/indent/token_comment.c Sun Oct 24 21:55:07 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: token_comment.c,v 1.6 2021/10/24 21:48:16 rillig Exp $ */
+/* $NetBSD: token_comment.c,v 1.7 2021/10/24 21:55:07 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -714,3 +714,18 @@
#indent end
#indent run-equals-input -nfc1
+
+/*
+ * A completely empty line in a box comment must be copied unmodified to the
+ * output. This is done in process_comment by adding a space to the end of an
+ * otherwise empty comment. This space forces dump_line to add some output,
+ * but the trailing space is discarded, resulting in an empty line.
+ */
+#indent input
+/*- comment
+
+
+end */
+#indent end
+
+#indent run-equals-input -nfc1
Home |
Main Index |
Thread Index |
Old Index