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 bug i...
details: https://anonhg.NetBSD.org/src/rev/5fdc488f6ab6
branches: trunk
changeset: 1019391:5fdc488f6ab6
user: rillig <rillig%NetBSD.org@localhost>
date: Mon Mar 08 20:55:34 2021 +0000
description:
tests/indent: demonstrate another bug in nested blocks
diffstat:
distrib/sets/lists/tests/mi | 4 +++-
tests/usr.bin/indent/Makefile | 4 +++-
tests/usr.bin/indent/block.0 | 14 ++++++++++++++
tests/usr.bin/indent/block.0.stdout | 15 +++++++++++++++
4 files changed, 35 insertions(+), 2 deletions(-)
diffs (73 lines):
diff -r 8c6a62bc442f -r 5fdc488f6ab6 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Mon Mar 08 20:55:06 2021 +0000
+++ b/distrib/sets/lists/tests/mi Mon Mar 08 20:55:34 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1027 2021/03/08 20:12:04 rillig Exp $
+# $NetBSD: mi,v 1.1028 2021/03/08 20:55:34 rillig Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -4708,6 +4708,8 @@
./usr/tests/usr.bin/indent/Kyuafile tests-usr.bin-tests compattestfile,atf,kyua
./usr/tests/usr.bin/indent/binary.0 tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/indent/binary.0.stdout tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/indent/block.0 tests-usr.bin-tests compattestfile,atf
+./usr/tests/usr.bin/indent/block.0.stdout tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/indent/comment-line-end.0 tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/indent/comment-line-end.0.stdout tests-usr.bin-tests compattestfile,atf
./usr/tests/usr.bin/indent/comments.0 tests-usr.bin-tests compattestfile,atf
diff -r 8c6a62bc442f -r 5fdc488f6ab6 tests/usr.bin/indent/Makefile
--- a/tests/usr.bin/indent/Makefile Mon Mar 08 20:55:06 2021 +0000
+++ b/tests/usr.bin/indent/Makefile Mon Mar 08 20:55:34 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2021/03/08 20:12:04 rillig Exp $
+# $NetBSD: Makefile,v 1.5 2021/03/08 20:55:34 rillig Exp $
.include <bsd.own.mk>
@@ -8,6 +8,8 @@
FILESDIR= ${TESTSDIR}
FILES= binary.0
FILES+= binary.0.stdout
+FILES+= block.0
+FILES+= block.0.stdout
FILES+= comment-line-end.0
FILES+= comment-line-end.0.stdout
FILES+= comments.0
diff -r 8c6a62bc442f -r 5fdc488f6ab6 tests/usr.bin/indent/block.0
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/indent/block.0 Mon Mar 08 20:55:34 2021 +0000
@@ -0,0 +1,14 @@
+/* $NetBSD: block.0,v 1.1 2021/03/08 20:55:34 rillig Exp $ */
+/* $FreeBSD$ */
+
+void
+function(void)
+{
+ if (true) {
+
+ }
+
+ {
+ print("block");
+ }
+}
diff -r 8c6a62bc442f -r 5fdc488f6ab6 tests/usr.bin/indent/block.0.stdout
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/indent/block.0.stdout Mon Mar 08 20:55:34 2021 +0000
@@ -0,0 +1,15 @@
+/* $NetBSD: block.0.stdout,v 1.1 2021/03/08 20:55:34 rillig Exp $ */
+/* $FreeBSD$ */
+
+void
+function(void)
+{
+ if (true) {
+
+/* $ FIXME: indent must not merge these braces. */
+ } {
+/* $ FIXME: the following empty line was not in the input. */
+
+ print("block");
+ }
+}
Home |
Main Index |
Thread Index |
Old Index