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 test for '--versi...



details:   https://anonhg.NetBSD.org/src/rev/3f42c49b6f7a
branches:  trunk
changeset: 990016:3f42c49b6f7a
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Oct 23 20:23:27 2021 +0000

description:
tests/indent: migrate test for '--version' to t_options

diffstat:

 distrib/sets/lists/tests/mi                |   9 +++++----
 tests/usr.bin/indent/Makefile              |   6 ++----
 tests/usr.bin/indent/opt--version.0        |   6 ------
 tests/usr.bin/indent/opt--version.0.pro    |   4 ----
 tests/usr.bin/indent/opt--version.0.stdout |   1 -
 tests/usr.bin/indent/opt_version.c         |  17 +++++++++++++++++
 6 files changed, 24 insertions(+), 19 deletions(-)

diffs (101 lines):

diff -r dc23b7c1568f -r 3f42c49b6f7a distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Sat Oct 23 20:17:08 2021 +0000
+++ b/distrib/sets/lists/tests/mi       Sat Oct 23 20:23:27 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1158 2021/10/23 20:17:08 rillig Exp $
+# $NetBSD: mi,v 1.1159 2021/10/23 20:23:27 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -4789,9 +4789,9 @@
 ./usr/tests/usr.bin/indent/ncs.0.stdout                                        tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/offsetof.0                                  tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/offsetof.0.stdout                           tests-obsolete          obsolete,atf
-./usr/tests/usr.bin/indent/opt--version.0                              tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/opt--version.0.pro                          tests-usr.bin-tests     compattestfile,atf
-./usr/tests/usr.bin/indent/opt--version.0.stdout                       tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/opt--version.0                              tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/opt--version.0.pro                          tests-obsolete          obsolete,atf
+./usr/tests/usr.bin/indent/opt--version.0.stdout                       tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/opt-P.0                                     tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/opt-P.0.pro                                 tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/opt-P.0.stdout                              tests-obsolete          obsolete,atf
@@ -5043,6 +5043,7 @@
 ./usr/tests/usr.bin/indent/opt_ts.c                                    tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/opt_ut.c                                    tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/opt_v.c                                     tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/indent/opt_version.c                               tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/indent/parens.0                                    tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/parens.0.pro                                        tests-obsolete          obsolete,atf
 ./usr/tests/usr.bin/indent/parens.0.stdout                             tests-obsolete          obsolete,atf
diff -r dc23b7c1568f -r 3f42c49b6f7a tests/usr.bin/indent/Makefile
--- a/tests/usr.bin/indent/Makefile     Sat Oct 23 20:17:08 2021 +0000
+++ b/tests/usr.bin/indent/Makefile     Sat Oct 23 20:23:27 2021 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.30 2021/10/23 20:17:08 rillig Exp $
+#      $NetBSD: Makefile,v 1.31 2021/10/23 20:23:27 rillig Exp $
 
 .include <bsd.own.mk>
 
@@ -18,9 +18,6 @@
 FILES+=                lex_ident.c
 FILES+=                lex_char.c
 FILES+=                lex_string.c
-FILES+=                opt--version.0
-FILES+=                opt--version.0.pro
-FILES+=                opt--version.0.stdout
 FILES+=                opt-U.0
 FILES+=                opt-U.0.list
 FILES+=                opt-U.0.pro
@@ -74,6 +71,7 @@
 FILES+=                opt_ts.c
 FILES+=                opt_ut.c
 FILES+=                opt_v.c
+FILES+=                opt_version.c
 FILES+=                ps_ind_level.c
 FILES+=                t_options.awk
 FILES+=                token_binary_op.c
diff -r dc23b7c1568f -r 3f42c49b6f7a tests/usr.bin/indent/opt--version.0
--- a/tests/usr.bin/indent/opt--version.0       Sat Oct 23 20:17:08 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-/* $NetBSD: opt--version.0,v 1.2 2021/03/06 19:30:44 rillig Exp $ */
-/* $FreeBSD$ */
-
-When the option '--version' is given, any other options are ignored.
-Therefore the source file, if given, can contain arbitrary text that
-even might generate syntax errors when given to a C compiler.
diff -r dc23b7c1568f -r 3f42c49b6f7a tests/usr.bin/indent/opt--version.0.pro
--- a/tests/usr.bin/indent/opt--version.0.pro   Sat Oct 23 20:17:08 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-/* $NetBSD: opt--version.0.pro,v 1.1 2021/03/06 17:56:33 rillig Exp $ */
-/* $FreeBSD$ */
-
---version
diff -r dc23b7c1568f -r 3f42c49b6f7a tests/usr.bin/indent/opt--version.0.stdout
--- a/tests/usr.bin/indent/opt--version.0.stdout        Sat Oct 23 20:17:08 2021 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-FreeBSD indent 2.0
diff -r dc23b7c1568f -r 3f42c49b6f7a tests/usr.bin/indent/opt_version.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/indent/opt_version.c        Sat Oct 23 20:23:27 2021 +0000
@@ -0,0 +1,17 @@
+/* $NetBSD: opt_version.c,v 1.1 2021/10/23 20:23:27 rillig Exp $ */
+/* $FreeBSD$ */
+
+/*
+ * Tests for the option '--version', which outputs the program version and
+ * exits immediately.
+ */
+
+#indent input
+When the option '--version' is given, any other options are ignored.
+Therefore the source file, if given, can contain arbitrary text that
+even might generate syntax errors when given to a C compiler.
+#indent end
+
+#indent run --version
+FreeBSD indent 2.0
+#indent end



Home | Main Index | Thread Index | Old Index