Module Name:    src
Committed By:   rillig
Date:           Sat Oct 23 20:30:23 UTC 2021

Modified Files:
        src/distrib/sets/lists/tests: mi
        src/tests/usr.bin/indent: Makefile
Added Files:
        src/tests/usr.bin/indent: opt_bap_sob.c
Removed Files:
        src/tests/usr.bin/indent: opt-bap+sob.0 opt-bap+sob.0.pro
            opt-bap+sob.0.stdout

Log Message:
tests/indent: migrate test for '-bap -sob' to t_options


To generate a diff of this commit:
cvs rdiff -u -r1.1159 -r1.1160 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.31 -r1.32 src/tests/usr.bin/indent/Makefile
cvs rdiff -u -r1.1 -r0 src/tests/usr.bin/indent/opt-bap+sob.0 \
    src/tests/usr.bin/indent/opt-bap+sob.0.pro
cvs rdiff -u -r1.2 -r0 src/tests/usr.bin/indent/opt-bap+sob.0.stdout
cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/indent/opt_bap_sob.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.1159 src/distrib/sets/lists/tests/mi:1.1160
--- src/distrib/sets/lists/tests/mi:1.1159	Sat Oct 23 20:23:27 2021
+++ src/distrib/sets/lists/tests/mi	Sat Oct 23 20:30:23 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1159 2021/10/23 20:23:27 rillig Exp $
+# $NetBSD: mi,v 1.1160 2021/10/23 20:30:23 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4811,9 +4811,9 @@
 ./usr/tests/usr.bin/indent/opt-badp.0					tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/indent/opt-badp.0.pro				tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/indent/opt-badp.0.stdout				tests-obsolete		obsolete,atf
-./usr/tests/usr.bin/indent/opt-bap+sob.0				tests-usr.bin-tests	compattestfile,atf
-./usr/tests/usr.bin/indent/opt-bap+sob.0.pro				tests-usr.bin-tests	compattestfile,atf
-./usr/tests/usr.bin/indent/opt-bap+sob.0.stdout				tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/indent/opt-bap+sob.0				tests-obsolete		obsolete,atf
+./usr/tests/usr.bin/indent/opt-bap+sob.0.pro				tests-obsolete		obsolete,atf
+./usr/tests/usr.bin/indent/opt-bap+sob.0.stdout				tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/indent/opt-bap.0					tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/indent/opt-bap.0.pro				tests-obsolete		obsolete,atf
 ./usr/tests/usr.bin/indent/opt-bap.0.stdout				tests-obsolete		obsolete,atf
@@ -5009,6 +5009,7 @@
 ./usr/tests/usr.bin/indent/opt_bad.c					tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/opt_badp.c					tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/opt_bap.c					tests-usr.bin-tests	compattestfile,atf
+./usr/tests/usr.bin/indent/opt_bap_sob.c				tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/opt_bbb.c					tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/opt_bc.c					tests-usr.bin-tests	compattestfile,atf
 ./usr/tests/usr.bin/indent/opt_bl_br.c					tests-usr.bin-tests	compattestfile,atf

Index: src/tests/usr.bin/indent/Makefile
diff -u src/tests/usr.bin/indent/Makefile:1.31 src/tests/usr.bin/indent/Makefile:1.32
--- src/tests/usr.bin/indent/Makefile:1.31	Sat Oct 23 20:23:27 2021
+++ src/tests/usr.bin/indent/Makefile	Sat Oct 23 20:30:23 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.31 2021/10/23 20:23:27 rillig Exp $
+#	$NetBSD: Makefile,v 1.32 2021/10/23 20:30:23 rillig Exp $
 
 .include <bsd.own.mk>
 
@@ -22,9 +22,6 @@ FILES+=		opt-U.0
 FILES+=		opt-U.0.list
 FILES+=		opt-U.0.pro
 FILES+=		opt-U.0.stdout
-FILES+=		opt-bap+sob.0
-FILES+=		opt-bap+sob.0.pro
-FILES+=		opt-bap+sob.0.stdout
 FILES+=		opt-npro.0
 FILES+=		opt-npro.0.pro
 FILES+=		opt-npro.0.stdout
@@ -37,6 +34,7 @@ FILES+=		opt_bacc.c
 FILES+=		opt_bad.c
 FILES+=		opt_badp.c
 FILES+=		opt_bap.c
+FILES+=		opt_bap_sob.c
 FILES+=		opt_bbb.c
 FILES+=		opt_bc.c
 FILES+=		opt_bl_br.c

Added files:

Index: src/tests/usr.bin/indent/opt_bap_sob.c
diff -u /dev/null src/tests/usr.bin/indent/opt_bap_sob.c:1.1
--- /dev/null	Sat Oct 23 20:30:23 2021
+++ src/tests/usr.bin/indent/opt_bap_sob.c	Sat Oct 23 20:30:23 2021
@@ -0,0 +1,36 @@
+/* $NetBSD: opt_bap_sob.c,v 1.1 2021/10/23 20:30:23 rillig Exp $ */
+/* $FreeBSD$ */
+
+/*
+ * As of 2021-03-08, the combination of -bap and -sob, which occurs in the
+ * example indent.pro from NetBSD, removes the empty line above the
+ * separator.  Seen in games/cgram/cgram.c.
+ */
+
+#indent input
+void
+function1(void)
+{
+}
+
+///// separator /////
+
+void
+function2(void)
+{
+}
+#indent end
+
+#indent run -bap -sob
+void
+function1(void)
+{
+}
+/* $ FIXME: Keep the empty line between the '}' and the '//'. */
+///// separator /////
+
+void
+function2(void)
+{
+}
+#indent end

Reply via email to