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 missing check ...



details:   https://anonhg.NetBSD.org/src/rev/2e7b8defec4c
branches:  trunk
changeset: 945990:2e7b8defec4c
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Nov 12 22:40:11 2020 +0000

description:
make(1): add test for missing check on .endif with arguments

diffstat:

 usr.bin/make/unit-tests/directive-endif.mk |  21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r e22cf6425867 -r 2e7b8defec4c usr.bin/make/unit-tests/directive-endif.mk
--- a/usr.bin/make/unit-tests/directive-endif.mk        Thu Nov 12 22:28:02 2020 +0000
+++ b/usr.bin/make/unit-tests/directive-endif.mk        Thu Nov 12 22:40:11 2020 +0000
@@ -1,8 +1,27 @@
-# $NetBSD: directive-endif.mk,v 1.2 2020/08/16 14:25:16 rillig Exp $
+# $NetBSD: directive-endif.mk,v 1.3 2020/11/12 22:40:11 rillig Exp $
 #
 # Tests for the .endif directive.
+#
+# See also:
+#      Cond_EvalLine
 
 # TODO: Implementation
 
+.MAKEFLAGS: -dL
+
+# Error: .endif does not take arguments
+# XXX: Missing error message
+.if 0
+.endif 0
+
+# Error: .endif does not take arguments
+# XXX: Missing error message
+.if 1
+.endif 1
+
+# Comments are allowed after an '.endif'.
+.if 2
+.endif # comment
+
 all:
        @:;



Home | Main Index | Thread Index | Old Index