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 why declaration ...



details:   https://anonhg.NetBSD.org/src/rev/331c17797a8d
branches:  trunk
changeset: 1024648:331c17797a8d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 30 11:41:49 2021 +0000

description:
tests/indent: document why declaration lines are broken unnecessarily

diffstat:

 tests/usr.bin/indent/fmt_decl.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 24d103597def -r 331c17797a8d tests/usr.bin/indent/fmt_decl.c
--- a/tests/usr.bin/indent/fmt_decl.c   Sat Oct 30 11:41:45 2021 +0000
+++ b/tests/usr.bin/indent/fmt_decl.c   Sat Oct 30 11:41:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fmt_decl.c,v 1.6 2021/10/27 00:04:51 rillig Exp $      */
+/*     $NetBSD: fmt_decl.c,v 1.7 2021/10/30 11:41:49 rillig Exp $      */
 /* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */
 
 /* See FreeBSD r303570 */
@@ -235,6 +235,7 @@
  * the line length limit is set quite low.
  */
 #indent input
+struct s a,b;
 struct s0 a,b;
 struct s01 a,b;
 struct s012 a,b;
@@ -252,9 +253,13 @@
 #indent end
 
 #indent run -l20 -di0
-/* $ XXX: Why is this declaration broken? There's plenty of space left. */
+struct s a, b;
+/* $ XXX: See process_comma, varname_len for why this line is broken. */
 struct s0 a,
    b;
+/* $ XXX: The indentation of the second line is wrong. The variable names */
+/* $ XXX: 'a' and 'b' should be in the same column; the word 'struct' is */
+/* $ XXX: missing in the calculation for the indentation. */
 struct s01 a,
     b;
 struct s012 a,



Home | Main Index | Thread Index | Old Index