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 another examp...



details:   https://anonhg.NetBSD.org/src/rev/79a368b85652
branches:  trunk
changeset: 1024507:79a368b85652
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Oct 26 23:58:40 2021 +0000

description:
tests/indent: demonstrate another example of wrong formatting

diffstat:

 tests/usr.bin/indent/fmt_decl.c |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (28 lines):

diff -r 79f76025b708 -r 79a368b85652 tests/usr.bin/indent/fmt_decl.c
--- a/tests/usr.bin/indent/fmt_decl.c   Tue Oct 26 23:37:40 2021 +0000
+++ b/tests/usr.bin/indent/fmt_decl.c   Tue Oct 26 23:58:40 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fmt_decl.c,v 1.4 2021/10/26 23:37:40 rillig Exp $      */
+/*     $NetBSD: fmt_decl.c,v 1.5 2021/10/26 23:58:40 rillig Exp $      */
 /* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */
 
 /* See FreeBSD r303570 */
@@ -376,3 +376,18 @@
 char *(*f2)();
 }
 #indent end
+
+#indent run
+int
+main(void)
+{
+/* $ XXX: Not really pretty, the name 'f1' should be aligned, if at all. */
+       char            (*f1)() = NULL;
+/* $ FIXME: The following declaration must be indented. */
+/* $ XXX: Not really pretty, the name 'f1' should be aligned, if at all. */
+char *(*       f1)() = NULL;
+/* $ FIXME: The following declaration must be indented. */
+/* $ XXX: Not really pretty, the name 'f2' should be aligned, if at all. */
+char *(*       f2)();
+}
+#indent end



Home | Main Index | Thread Index | Old Index