diff options
Diffstat (limited to 'unit-tests/directive-else.mk')
-rw-r--r-- | unit-tests/directive-else.mk | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/unit-tests/directive-else.mk b/unit-tests/directive-else.mk index 8fbbb5189ad5..fdd94007a1fa 100644 --- a/unit-tests/directive-else.mk +++ b/unit-tests/directive-else.mk @@ -1,7 +1,9 @@ -# $NetBSD: directive-else.mk,v 1.4 2020/10/24 08:46:08 rillig Exp $ +# $NetBSD: directive-else.mk,v 1.6 2020/11/13 09:01:59 rillig Exp $ # # Tests for the .else directive. +.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 @@ -28,5 +30,17 @@ . info After an extra .else, everything is skipped. .endif +# An .else may have a comment. This comment does not count as an argument, +# therefore no parse error. +.if 0 +.else # comment +.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 + all: @:; |