Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): add test for .endfor withou...



details:   https://anonhg.NetBSD.org/src/rev/8bcb7c77ff3c
branches:  trunk
changeset: 979509:8bcb7c77ff3c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Wed Dec 30 14:50:08 2020 +0000

description:
make(1): add test for .endfor without corresponding .for

diffstat:

 distrib/sets/lists/tests/mi                  |  4 +++-
 usr.bin/make/unit-tests/Makefile             |  3 ++-
 usr.bin/make/unit-tests/directive-endfor.exp |  4 ++++
 usr.bin/make/unit-tests/directive-endfor.mk  |  9 +++++++++
 4 files changed, 18 insertions(+), 2 deletions(-)

diffs (56 lines):

diff -r 07b0017e6ec6 -r 8bcb7c77ff3c distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi       Wed Dec 30 14:28:32 2020 +0000
+++ b/distrib/sets/lists/tests/mi       Wed Dec 30 14:50:08 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1001 2020/12/30 13:15:07 rillig Exp $
+# $NetBSD: mi,v 1.1002 2020/12/30 14:50:08 rillig Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -5042,6 +5042,8 @@
 ./usr/tests/usr.bin/make/unit-tests/directive-elifnmake.mk                     tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/directive-else.exp                         tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/directive-else.mk                          tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/directive-endfor.exp                       tests-usr.bin-tests     compattestfile,atf
+./usr/tests/usr.bin/make/unit-tests/directive-endfor.mk                                tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/directive-endif.exp                                tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/directive-endif.mk                         tests-usr.bin-tests     compattestfile,atf
 ./usr/tests/usr.bin/make/unit-tests/directive-error.exp                                tests-usr.bin-tests     compattestfile,atf
diff -r 07b0017e6ec6 -r 8bcb7c77ff3c usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile  Wed Dec 30 14:28:32 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile  Wed Dec 30 14:50:08 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.258 2020/12/29 01:45:06 rillig Exp $
+# $NetBSD: Makefile,v 1.259 2020/12/30 14:50:08 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -153,6 +153,7 @@
 TESTS+=                directive-elifndef
 TESTS+=                directive-elifnmake
 TESTS+=                directive-else
+TESTS+=                directive-endfor
 TESTS+=                directive-endif
 TESTS+=                directive-error
 TESTS+=                directive-export
diff -r 07b0017e6ec6 -r 8bcb7c77ff3c usr.bin/make/unit-tests/directive-endfor.exp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/directive-endfor.exp      Wed Dec 30 14:50:08 2020 +0000
@@ -0,0 +1,4 @@
+make: "directive-endfor.mk" line 9: for-less endfor
+make: Fatal errors encountered -- cannot continue
+make: stopped in unit-tests
+exit status 1
diff -r 07b0017e6ec6 -r 8bcb7c77ff3c usr.bin/make/unit-tests/directive-endfor.mk
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/usr.bin/make/unit-tests/directive-endfor.mk       Wed Dec 30 14:50:08 2020 +0000
@@ -0,0 +1,9 @@
+# $NetBSD: directive-endfor.mk,v 1.1 2020/12/30 14:50:08 rillig Exp $
+#
+# Test for the directive .endfor, which ends a .for loop.
+#
+# See also:
+#      directive-for.mk
+
+# An .endfor without a corresponding .for is a parse error.
+.endfor



Home | Main Index | Thread Index | Old Index