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: remove duplicate data fro...



details:   https://anonhg.NetBSD.org/src/rev/a6a856fd7dce
branches:  trunk
changeset: 989520:a6a856fd7dce
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 16 05:40:17 2021 +0000

description:
tests/indent: remove duplicate data from options tests

diffstat:

 tests/usr.bin/indent/opt_bbb.c    |  28 +------------------
 tests/usr.bin/indent/opt_bc.c     |   7 +----
 tests/usr.bin/indent/opt_bs.c     |  19 +------------
 tests/usr.bin/indent/opt_cdb.c    |  47 +------------------------------
 tests/usr.bin/indent/opt_ce.c     |  13 +--------
 tests/usr.bin/indent/opt_cs.c     |   8 +----
 tests/usr.bin/indent/opt_eei.c    |  16 +----------
 tests/usr.bin/indent/opt_ei.c     |  18 +-----------
 tests/usr.bin/indent/opt_fbs.c    |   6 +---
 tests/usr.bin/indent/opt_fc1.c    |  38 +------------------------
 tests/usr.bin/indent/opt_fcb.c    |  34 +----------------------
 tests/usr.bin/indent/opt_ip.c     |  23 +--------------
 tests/usr.bin/indent/opt_lp.c     |  16 +----------
 tests/usr.bin/indent/opt_lpl.c    |  26 +----------------
 tests/usr.bin/indent/opt_pcs.c    |  12 +-------
 tests/usr.bin/indent/opt_psl.c    |   8 +----
 tests/usr.bin/indent/opt_sc.c     |  17 +----------
 tests/usr.bin/indent/opt_sob.c    |  58 +--------------------------------------
 tests/usr.bin/indent/t_options.sh |  14 +++++++--
 19 files changed, 29 insertions(+), 379 deletions(-)

diffs (truncated from 696 to 300 lines):

diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_bbb.c
--- a/tests/usr.bin/indent/opt_bbb.c    Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_bbb.c    Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_bbb.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_bbb.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -57,32 +57,6 @@
 }
 #indent end
 
-#indent input
-/*
- * This is a block comment.
- */
-/* This is not a block comment since it is single-line. */
-/*
- * This is a second block comment.
- */
-/* This is not a block comment. */
-/*
- * Documentation of global_variable.
- */
-int global_variable;
-/*
- * Documentation of function_declaration.
- */
-void function_declaration(void);
-/*
- * Documentation of function_definition.
- */
-void
-function_definition(void)
-{
-}
-#indent end
-
 #indent run -nbbb
 /*
  * This is a block comment.
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_bc.c
--- a/tests/usr.bin/indent/opt_bc.c     Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_bc.c     Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_bc.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_bc.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -13,11 +13,6 @@
 void           function_declaration(int a, int b, int c);
 #indent end
 
-#indent input
-int a,b,c;
-void function_declaration(int a,int b,int c);
-#indent end
-
 #indent run -nbc
 int            a, b, c;
 void           function_declaration(int a, int b, int c);
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_bs.c
--- a/tests/usr.bin/indent/opt_bs.c     Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_bs.c     Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_bs.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_bs.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -35,23 +35,6 @@
 }
 #indent end
 
-#indent input
-void
-example(int i)
-{
-       print(sizeof(i));
-       print(sizeof(int));
-
-       print(sizeof i);
-       print(sizeof (i));
-       print(sizeof (int));
-
-       print(sizeof   i);
-       print(sizeof   (i));
-       print(sizeof   (int));
-}
-#indent end
-
 #indent run -nbs
 void
 example(int i)
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_cdb.c
--- a/tests/usr.bin/indent/opt_cdb.c    Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_cdb.c    Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_cdb.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_cdb.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -81,51 +81,6 @@
 }
 #indent end
 
-#indent input
-/* A single-line comment. */
-
-/* A
- * multi-line
- * comment. */
-
-/*
- * A
- * multi-line
- * comment.
- */
-
-int            ga;             /* A single-line comment. */
-
-int            gb;             /* A
-                                * multi-line
-                                * comment. */
-
-int            gc;             /*
-                                * A
-                                * multi-line
-                                * comment.
-                                */
-
-void
-example(void)
-{
-       /* A single-line comment. */
-       int la;
-
-       /* A
-        * multi-line
-        * comment. */
-       int lb;
-
-       /*
-        * A
-        * multi-line
-        * comment.
-        */
-       int lc;
-}
-#indent end
-
 #indent run -ncdb
 /* A single-line comment. */
 
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_ce.c
--- a/tests/usr.bin/indent/opt_ce.c     Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_ce.c     Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_ce.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_ce.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -28,17 +28,6 @@
 }
 #indent end
 
-#indent input
-void
-example(int n)
-{
-       if (n > 99) { print("large"); }
-       else if (n > 9) { print("double-digit"); }
-       else if (n > 0) print("positive");
-       else { print("negative"); }
-}
-#indent end
-
 #indent run -nce
 void
 example(int n)
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_cs.c
--- a/tests/usr.bin/indent/opt_cs.c     Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_cs.c     Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_cs.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_cs.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -13,12 +13,6 @@
 int            i3 = (int) 3.0;
 #indent end
 
-#indent input
-int            i0 = (int)3.0;
-int            i1 = (int) 3.0;
-int            i3 = (int)   3.0;
-#indent end
-
 #indent run -ncs
 int            i0 = (int)3.0;
 int            i1 = (int)3.0;
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_eei.c
--- a/tests/usr.bin/indent/opt_eei.c    Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_eei.c    Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_eei.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_eei.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -29,20 +29,6 @@
 }
 #indent end
 
-#indent input
-bool
-less(int a, int b)
-{
-       if (a <
-           b)
-               return true;
-       if (a
-           <
-           b)
-               return true;
-}
-#indent end
-
 #indent run -neei
 bool
 less(int a, int b)
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_ei.c
--- a/tests/usr.bin/indent/opt_ei.c     Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_ei.c     Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_ei.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_ei.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -33,22 +33,6 @@
 }
 #indent end
 
-#indent input
-void
-example(int n)
-{
-       if (n > 99) {
-               print("large");
-       } else if (n > 9) {
-               print("double-digit");
-       } else if (n > 0)
-               print("positive");
-       else {
-               print("negative");
-       }
-}
-#indent end
-
 #indent run -nei
 void
 example(int n)
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_fbs.c
--- a/tests/usr.bin/indent/opt_fbs.c    Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_fbs.c    Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_fbs.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_fbs.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -12,10 +12,6 @@
 }
 #indent end
 
-#indent input
-void example(int n) {}
-#indent end
-
 #indent run -nfbs
 void
 example(int n) {
diff -r 2b88436b36f6 -r a6a856fd7dce tests/usr.bin/indent/opt_fc1.c
--- a/tests/usr.bin/indent/opt_fc1.c    Sat Oct 16 05:39:32 2021 +0000
+++ b/tests/usr.bin/indent/opt_fc1.c    Sat Oct 16 05:40:17 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: opt_fc1.c,v 1.1 2021/10/16 03:20:13 rillig Exp $ */
+/* $NetBSD: opt_fc1.c,v 1.2 2021/10/16 05:40:17 rillig Exp $ */
 /* $FreeBSD$ */
 
 #indent input
@@ -73,42 +73,6 @@
                                 * second comment */
 #indent end



Home | Main Index | Thread Index | Old Index