Module Name: src
Committed By: rillig
Date: Thu Nov 12 22:40:11 UTC 2020
Modified Files:
src/usr.bin/make/unit-tests: directive-endif.mk
Log Message:
make(1): add test for missing check on .endif with arguments
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/usr.bin/make/unit-tests/directive-endif.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/unit-tests/directive-endif.mk
diff -u src/usr.bin/make/unit-tests/directive-endif.mk:1.2 src/usr.bin/make/unit-tests/directive-endif.mk:1.3
--- src/usr.bin/make/unit-tests/directive-endif.mk:1.2 Sun Aug 16 14:25:16 2020
+++ src/usr.bin/make/unit-tests/directive-endif.mk Thu Nov 12 22:40:11 2020
@@ -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:
@:;