aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/cond-func-empty.mk
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/cond-func-empty.mk')
-rw-r--r--unit-tests/cond-func-empty.mk9
1 files changed, 6 insertions, 3 deletions
diff --git a/unit-tests/cond-func-empty.mk b/unit-tests/cond-func-empty.mk
index d377a84ff574..17e76a63f2e8 100644
--- a/unit-tests/cond-func-empty.mk
+++ b/unit-tests/cond-func-empty.mk
@@ -1,4 +1,4 @@
-# $NetBSD: cond-func-empty.mk,v 1.25 2024/06/02 15:31:26 rillig Exp $
+# $NetBSD: cond-func-empty.mk,v 1.28 2025/01/11 20:54:45 rillig Exp $
#
# Tests for the empty() function in .if conditions, which tests an
# expression for emptiness.
@@ -163,8 +163,7 @@ ${:U WORD }= variable name with spaces
. error
.endif
-# expect+2: Unclosed variable "WORD"
-# expect+1: Malformed conditional (empty(WORD)
+# expect+1: Unclosed variable "WORD"
.if empty(WORD
. error
.else
@@ -207,6 +206,10 @@ VARNAME= ${VARNAME${:U1}}
.if defined(VARNAME${:U2}) && !empty(VARNAME${:U2})
.endif
+# Expressions in the argument of a function call don't have to be defined.
+.if !empty(${UNDEF})
+. error
+.endif
# If the word 'empty' is not followed by '(', it is not a function call but an
# ordinary bare word. This bare word is interpreted as 'defined(empty)', and