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/456b12c96c67
branches: trunk
changeset: 1024436:456b12c96c67
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 7ff24d224b84 -r 456b12c96c67 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 7ff24d224b84 -r 456b12c96c67 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 7ff24d224b84 -r 456b12c96c67 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 7ff24d224b84 -r 456b12c96c67 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 7ff24d224b84 -r 456b12c96c67 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 7ff24d224b84 -r 456b12c96c67 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