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: test function declaration...
details: https://anonhg.NetBSD.org/src/rev/f8813d5721b8
branches: trunk
changeset: 1024717:f8813d5721b8
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Oct 31 21:31:55 2021 +0000
description:
tests/indent: test function declaration with '-pcs' and '-npcs'
The conditions in want_blank_before_lparen are not ordered correctly.
opt.proc_calls_space should override ')('.
diffstat:
tests/usr.bin/indent/opt_pcs.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (30 lines):
diff -r 356f566c97c2 -r f8813d5721b8 tests/usr.bin/indent/opt_pcs.c
--- a/tests/usr.bin/indent/opt_pcs.c Sun Oct 31 21:06:56 2021 +0000
+++ b/tests/usr.bin/indent/opt_pcs.c Sun Oct 31 21:31:55 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_pcs.c,v 1.6 2021/10/31 21:06:56 rillig Exp $ */
+/* $NetBSD: opt_pcs.c,v 1.7 2021/10/31 21:31:55 rillig Exp $ */
/* $FreeBSD$ */
/*
@@ -43,12 +43,17 @@
#indent input
+void ( * signal ( void ( * handler ) ( int ) ) ) ( int ) ;
int var = (function)(arg);
#indent end
-/* TODO: add space between the parentheses. */
-#indent run-equals-input -di0 -pcs
-#indent run-equals-input -di0 -npcs
+/* TODO: add a blank between ')' and '('. */
+#indent run -npsl -di0 -pcs
+void (*signal(void (*handler)(int)))(int);
+int var = (function)(arg);
+#indent end
+
+#indent run-equals-prev-output -npsl -di0 -npcs
/*
Home |
Main Index |
Thread Index |
Old Index