aboutsummaryrefslogtreecommitdiff
path: root/unit-tests/directive-undef.mk
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/directive-undef.mk')
-rw-r--r--unit-tests/directive-undef.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/unit-tests/directive-undef.mk b/unit-tests/directive-undef.mk
new file mode 100644
index 000000000000..ff91eeddb41f
--- /dev/null
+++ b/unit-tests/directive-undef.mk
@@ -0,0 +1,17 @@
+# $NetBSD: directive-undef.mk,v 1.3 2020/08/23 19:30:13 rillig Exp $
+#
+# Tests for the .undef directive.
+
+# As of 2020-07-28, .undef only undefines the first variable.
+# All further variable names are silently ignored.
+# See parse.c, string literal "undef".
+1= 1
+2= 2
+3= 3
+.undef 1 2 3
+.if ${1:U_}${2:U_}${3:U_} != _23
+.warning $1$2$3
+.endif
+
+all:
+ @:;