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: add more tests for -sob; ...



details:   https://anonhg.NetBSD.org/src/rev/094ae0059f21
branches:  trunk
changeset: 989093:094ae0059f21
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Oct 11 16:30:54 2021 +0000

description:
tests/indent: add more tests for -sob; nothing is swallowed at all

diffstat:

 tests/usr.bin/indent/opt-sob.0        |  24 ++++++++++++++++++++++--
 tests/usr.bin/indent/opt-sob.0.stdout |  24 ++++++++++++++++++++++--
 2 files changed, 44 insertions(+), 4 deletions(-)

diffs (78 lines):

diff -r 7a5cd0690f2a -r 094ae0059f21 tests/usr.bin/indent/opt-sob.0
--- a/tests/usr.bin/indent/opt-sob.0    Mon Oct 11 15:47:10 2021 +0000
+++ b/tests/usr.bin/indent/opt-sob.0    Mon Oct 11 16:30:54 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt-sob.0,v 1.2 2021/03/07 10:12:18 rillig Exp $ */
+/* $NetBSD: opt-sob.0,v 1.3 2021/10/11 16:30:54 rillig Exp $ */
 /* $FreeBSD$ */
 
 /* $ FIXME: There are lots of 'optional blank lines' here that should */
@@ -6,9 +6,29 @@
 void           function_declaration(void);
 
 
+int
+function_with_0_blank_lines(void)
+{
+    int                var;
+    var = value;
+    return var;
+}
 
 int
-function_definition(void)
+function_with_1_blank_line(void)
+{
+
+    int                var;
+
+    var = value;
+
+    return var;
+
+}
+
+
+int
+function_with_2_blank_lines(void)
 {
 
 
diff -r 7a5cd0690f2a -r 094ae0059f21 tests/usr.bin/indent/opt-sob.0.stdout
--- a/tests/usr.bin/indent/opt-sob.0.stdout     Mon Oct 11 15:47:10 2021 +0000
+++ b/tests/usr.bin/indent/opt-sob.0.stdout     Mon Oct 11 16:30:54 2021 +0000
@@ -1,12 +1,32 @@
-/* $NetBSD: opt-sob.0.stdout,v 1.2 2021/03/07 10:12:18 rillig Exp $ */
+/* $NetBSD: opt-sob.0.stdout,v 1.3 2021/10/11 16:30:54 rillig Exp $ */
 /* $FreeBSD$ */
 
 void           function_declaration(void);
 
 
+int
+function_with_0_blank_lines(void)
+{
+       int             var;
+       var = value;
+       return var;
+}
 
 int
-function_definition(void)
+function_with_1_blank_line(void)
+{
+
+       int             var;
+
+       var = value;
+
+       return var;
+
+}
+
+
+int
+function_with_2_blank_lines(void)
 {
 
 



Home | Main Index | Thread Index | Old Index