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 support for ancient ...



details:   https://anonhg.NetBSD.org/src/rev/e39e34cae0dd
branches:  trunk
changeset: 990635:e39e34cae0dd
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Oct 31 19:08:39 2021 +0000

description:
tests/indent: test support for ancient initialization without '='

diffstat:

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

diffs (33 lines):

diff -r 5f62d6fc5e50 -r e39e34cae0dd tests/usr.bin/indent/fmt_decl.c
--- a/tests/usr.bin/indent/fmt_decl.c   Sun Oct 31 18:06:42 2021 +0000
+++ b/tests/usr.bin/indent/fmt_decl.c   Sun Oct 31 19:08:39 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: fmt_decl.c,v 1.9 2021/10/31 17:22:48 rillig Exp $      */
+/*     $NetBSD: fmt_decl.c,v 1.10 2021/10/31 19:08:39 rillig Exp $     */
 /* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */
 
 /* See FreeBSD r303570 */
@@ -431,3 +431,23 @@
        char *(*        f2)();
 }
 #indent end
+
+
+/*
+ * In some ancient time long before ISO C90, variable declarations with
+ * initializer could be written without '='. The C Programming Language from
+ * 1978 doesn't mention this form anymore.
+ */
+#indent input
+int a - 1;
+{
+int a - 1;
+}
+#indent end
+
+#indent run -di0
+int a -1;
+{
+       int a -1;
+}
+#indent end



Home | Main Index | Thread Index | Old Index