aboutsummaryrefslogtreecommitdiff
path: root/contrib/bmake/unit-tests/directive-else.mk
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bmake/unit-tests/directive-else.mk')
-rw-r--r--contrib/bmake/unit-tests/directive-else.mk15
1 files changed, 9 insertions, 6 deletions
diff --git a/contrib/bmake/unit-tests/directive-else.mk b/contrib/bmake/unit-tests/directive-else.mk
index fdd94007a1fa..794057110ef7 100644
--- a/contrib/bmake/unit-tests/directive-else.mk
+++ b/contrib/bmake/unit-tests/directive-else.mk
@@ -1,19 +1,23 @@
-# $NetBSD: directive-else.mk,v 1.6 2020/11/13 09:01:59 rillig Exp $
+# $NetBSD: directive-else.mk,v 1.7 2020/12/14 22:17:11 rillig Exp $
#
# Tests for the .else directive.
+#
+# Since 2020-11-13, an '.else' followed by extraneous text generates a parse
+# error in -dL (lint) mode.
+#
+# Since 2020-12-15, an '.else' followed by extraneous text always generates
+# a parse error.
-.MAKEFLAGS: -dL # To enable the check for ".else <cond>"
-
-# The .else directive does not take any arguments.
-# As of 2020-08-29, make doesn't warn about this.
.if 0
. warning must not be reached
+# The .else directive does not take any arguments.
.else 123
. info ok
.endif
.if 1
. info ok
+# The .else directive does not take any arguments.
.else 123
. warning must not be reached
.endif
@@ -37,7 +41,6 @@
.endif
# A variable expression does count as an argument, even if it is empty.
-# XXX: This should be a parse error.
.if 0
.else ${:U}
.endif