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 wrong indenta...



details:   https://anonhg.NetBSD.org/src/rev/68516627817d
branches:  trunk
changeset: 990043:68516627817d
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Oct 24 19:24:22 2021 +0000

description:
tests/indent: demonstrate wrong indentation for initialized variable

diffstat:

 tests/usr.bin/indent/opt_di.c |  28 +++++++++++++++++++++++++++-
 1 files changed, 27 insertions(+), 1 deletions(-)

diffs (39 lines):

diff -r 83835608bd03 -r 68516627817d tests/usr.bin/indent/opt_di.c
--- a/tests/usr.bin/indent/opt_di.c     Sun Oct 24 19:14:33 2021 +0000
+++ b/tests/usr.bin/indent/opt_di.c     Sun Oct 24 19:24:22 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_di.c,v 1.2 2021/10/24 17:51:19 rillig Exp $ */
+/* $NetBSD: opt_di.c,v 1.3 2021/10/24 19:24:22 rillig Exp $ */
 /* $FreeBSD$ */
 
 /*
@@ -99,3 +99,29 @@
 int    tab16;
 struct long_name long_name;
 #indent end
+
+
+#indent input
+struct {
+       int member;
+} var = {
+       3,
+};
+#indent end
+
+/* FIXME: The variable name is indented by 6 spaces, should be 1. */
+#indent run -di0
+struct {
+       int member;
+}      var = {
+       3,
+};
+#indent end
+
+#indent run
+struct {
+       int             member;
+}              var = {
+       3,
+};
+#indent end



Home | Main Index | Thread Index | Old Index