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: migrate a few more tests ...



details:   https://anonhg.NetBSD.org/src/rev/05d5c0c98757
branches:  trunk
changeset: 989982:05d5c0c98757
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Oct 22 19:27:53 2021 +0000

description:
tests/indent: migrate a few more tests to t_options

diffstat:

 distrib/sets/lists/tests/mi                    |   41 ++-
 tests/usr.bin/indent/Makefile                  |   23 +-
 tests/usr.bin/indent/block.0                   |   14 -
 tests/usr.bin/indent/block.0.stdout            |   15 -
 tests/usr.bin/indent/declarations.0            |  135 ------------
 tests/usr.bin/indent/declarations.0.stderr     |    5 -
 tests/usr.bin/indent/declarations.0.stdout     |  129 ------------
 tests/usr.bin/indent/elsecomment.0             |   43 ----
 tests/usr.bin/indent/elsecomment.0.pro         |    3 -
 tests/usr.bin/indent/elsecomment.0.stdout      |   50 ----
 tests/usr.bin/indent/fmt_block.c               |   31 ++
 tests/usr.bin/indent/fmt_decl.c                |  262 +++++++++++++++++++++++++
 tests/usr.bin/indent/fmt_else_comment.c        |   97 +++++++++
 tests/usr.bin/indent/indent_variables.0        |   22 --
 tests/usr.bin/indent/indent_variables.0.pro    |    5 -
 tests/usr.bin/indent/indent_variables.0.stdout |   36 ---
 tests/usr.bin/indent/lex.0                     |   40 ---
 tests/usr.bin/indent/lex.0.pro                 |    4 -
 tests/usr.bin/indent/lex.0.stdout              |   21 --
 tests/usr.bin/indent/lex_ident.c               |   66 ++++++
 tests/usr.bin/indent/lineno.0                  |    9 -
 tests/usr.bin/indent/lineno.0.pro              |    4 -
 tests/usr.bin/indent/lineno.0.stdout           |   14 -
 tests/usr.bin/indent/opt_v.c                   |   27 ++-
 tests/usr.bin/indent/t_misc.sh                 |   84 +++++++-
 25 files changed, 593 insertions(+), 587 deletions(-)

diffs (truncated from 1352 to 300 lines):

diff -r 1fe808b9a728 -r 05d5c0c98757 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Fri Oct 22 19:21:12 2021 +0000
+++ b/distrib/sets/lists/tests/mi       Fri Oct 22 19:27:53 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1148 2021/10/19 20:20:24 rillig Exp $
+# $NetBSD: mi,v 1.1149 2021/10/22 19:27:53 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4732,8 +4732,8 @@
 ./usr/tests/usr.bin/indent/Kyuafile                                    tests-usr.bin-tests     compattestfile,atf,kyua
 ./usr/tests/usr.bin/indent/binary.0                                    tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/binary.0.stdout                             tests-obsolete          obsolete,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/block.0                                     tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/block.0.stdout                              tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/comment-line-end.0                          tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/comment-line-end.0.stdout                   tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/comments.0                                  tests-obsolete          obsolete,atf
@@ -4742,36 +4742,41 @@
 ./usr/tests/usr.bin/indent/cs.0                                                tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/cs.0.pro                                    tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/cs.0.stdout                                 tests-obsolete          obsolete,atf
-./usr/tests/usr.bin/indent/declarations.0                              tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/declarations.0.stderr                       tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/declarations.0.stdout                       tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/elsecomment.0                               tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/elsecomment.0.pro                           tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/elsecomment.0.stdout                                tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/declarations.0                              tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/declarations.0.stderr                       tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/declarations.0.stdout                       tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/elsecomment.0                               tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/elsecomment.0.pro                           tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/elsecomment.0.stdout                                tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/f_decls.0                                   tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/f_decls.0.stdout                            tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/float.0                                     tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/float.0.stdout                              tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/fmt_block.c                                 tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/fmt_decl.c                                  tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/fmt_else_comment.c                          tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/indent_off_on.c                             tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/indent_variables.0                          tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/indent_variables.0.pro                      tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/indent_variables.0.stdout                   tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/indent_variables.0                          tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/indent_variables.0.pro                      tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/indent_variables.0.stdout                   tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/label.0                                     tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/label.0.pro                                 tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/label.0.stdout                              tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/label.c                                     tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/lex.0                                       tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/lex.0.pro                                   tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/lex.0.stdout                                        tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/lex.0                                       tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/lex.0.pro                                   tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/lex.0.stdout                                        tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/lex.c                                       tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/lex_char.0                                  tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/lex_char.0.pro                              tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/lex_char.0.stdout                           tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/lex_ident.c                                 tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/lex_string.0                                        tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/lex_string.0.pro                            tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/lex_string.0.stdout                         tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/lineno.0                                    tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/lineno.0.pro                                        tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/lineno.0.stdout                             tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/lineno.0                                    tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/lineno.0.pro                                        tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/lineno.0.stdout                             tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/list_head.0                                 tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/list_head.0.stdout                          tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/ncs.0                                       tests-obsolete          obsolete,atf
diff -r 1fe808b9a728 -r 05d5c0c98757 tests/usr.bin/indent/Makefile
--- a/tests/usr.bin/indent/Makefile     Fri Oct 22 19:21:12 2021 +0000
+++ b/tests/usr.bin/indent/Makefile     Fri Oct 22 19:27:53 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.24 2021/10/19 20:20:24 rillig Exp $
+#      $NetBSD: Makefile,v 1.25 2021/10/22 19:27:53 rillig Exp $
 
 .include <bsd.own.mk>
 
@@ -9,33 +9,20 @@
 TESTS_SH+=     t_options
 
 FILESDIR=      ${TESTSDIR}
-FILES=         block.0
-FILES+=                block.0.stdout
-FILES+=                declarations.0
-FILES+=                declarations.0.stderr
-FILES+=                declarations.0.stdout
-FILES+=                elsecomment.0
-FILES+=                elsecomment.0.stdout
-FILES+=                elsecomment.0.pro
+FILES=         fmt_block.c
+FILES+=                fmt_decl.c
+FILES+=                fmt_else_comment.c
 FILES+=                f_decls.0
 FILES+=                f_decls.0.stdout
 FILES+=                indent_off_on.c
-FILES+=                indent_variables.0
-FILES+=                indent_variables.0.pro
-FILES+=                indent_variables.0.stdout
 FILES+=                label.c
-FILES+=                lex.0
-FILES+=                lex.0.pro
-FILES+=                lex.0.stdout
+FILES+=                lex_ident.c
 FILES+=                lex_char.0
 FILES+=                lex_char.0.pro
 FILES+=                lex_char.0.stdout
 FILES+=                lex_string.0
 FILES+=                lex_string.0.pro
 FILES+=                lex_string.0.stdout
-FILES+=                lineno.0
-FILES+=                lineno.0.pro
-FILES+=                lineno.0.stdout
 FILES+=                list_head.0
 FILES+=                list_head.0.stdout
 FILES+=                offsetof.0
diff -r 1fe808b9a728 -r 05d5c0c98757 tests/usr.bin/indent/block.0
--- a/tests/usr.bin/indent/block.0      Fri Oct 22 19:21:12 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-/* $NetBSD: block.0,v 1.1 2021/03/08 20:55:34 rillig Exp $ */
-/* $FreeBSD$ */
-
-void
-function(void)
-{
-       if (true) {
-
-       }
-
-       {
-               print("block");
-       }
-}
diff -r 1fe808b9a728 -r 05d5c0c98757 tests/usr.bin/indent/block.0.stdout
--- a/tests/usr.bin/indent/block.0.stdout       Fri Oct 22 19:21:12 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-/* $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");
-       }
-}
diff -r 1fe808b9a728 -r 05d5c0c98757 tests/usr.bin/indent/declarations.0
--- a/tests/usr.bin/indent/declarations.0       Fri Oct 22 19:21:12 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-/*     $NetBSD: declarations.0,v 1.4 2021/09/26 18:42:46 rillig Exp $  */
-/* $FreeBSD: head/usr.bin/indent/tests/declarations.0 334478 2018-06-01 09:41:15Z pstef $ */
-/* See r303570 */
-
-typedef void   (*voidptr) (int *);
-
-static const struct
-{
-       double          x;
-       double          y, z;
-} n[m + 1] =
-{
-       {
-               .0,
-               .9,
-               5
-       }
-};
-
-typedef struct Complex
-{
-       double          x;
-       double          y;
-}      Complex;
-
-void
-t1 (char *a, int b,
-       void (*fn)(void))
-{}
-
-void t2 (char *x, int y)
-{
-       int a,
-       b,
-       c;
-       int
-       *d,
-       *e,
-       *f;
-       int (*g)(),
-       (*h)(),
-       (*i)();
-       int j,
-       k,
-       l;
-       int m
-       ,n
-       ,o
-       ;
-       int             chars[ /* push the comma beyond column 74 .... */ ], x;
-}
-
-const int      int_minimum_size =
-MAXALIGN(offsetof(int, test)) + MAXIMUM_ALIGNOF;
-
-int *int_create(void)
-{
-
-}
-
-static
-_attribute_printf(1, 2)
-void
-print_error(const char *fmt,...)
-{
-
-}
-
-static LIST_HEAD(, alq) ald_active;
-static int ald_shutingdown = 0;
-struct thread *ald_thread;
-
-static int
-do_execve(td, args, mac_p)
-       struct thread *td;
-       struct image_args *args;
-       struct mac *mac_p;
-{
-
-}
-
-/* Trigger the warning about nested struct declarations. */
-struct s01 {
-struct s02 {
-struct s03 {
-struct s04 {
-struct s05 {
-struct s06 {
-struct s07 {
-struct s08 {
-struct s09 {
-struct s00 {
-struct s11 {
-struct s12 {
-struct s13 {
-struct s14 {
-struct s15 {
-struct s16 {
-struct s17 {
-struct s18 {
-struct s19 {
-struct s20 {
-struct s21 {
-struct s22 {
-struct s23 {
-struct s24 {
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-};
-
-int
-my_printf(const char *fmt, ...)
-{
-}



Home | Main Index | Thread Index | Old Index