Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make/unit-tests make(1): add test for missing argume...



details:   https://anonhg.NetBSD.org/src/rev/b330935d6693
branches:  trunk
changeset: 1012391:b330935d6693
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Jul 28 19:39:43 2020 +0000

description:
make(1): add test for missing argument validation in .undef

diffstat:

 usr.bin/make/unit-tests/varmisc.mk |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 868b53b1b958 -r b330935d6693 usr.bin/make/unit-tests/varmisc.mk
--- a/usr.bin/make/unit-tests/varmisc.mk        Tue Jul 28 19:19:30 2020 +0000
+++ b/usr.bin/make/unit-tests/varmisc.mk        Tue Jul 28 19:39:43 2020 +0000
@@ -1,4 +1,4 @@
-# $Id: varmisc.mk,v 1.18 2020/07/28 17:18:40 rillig Exp $
+# $Id: varmisc.mk,v 1.19 2020/07/28 19:39:43 rillig Exp $
 #
 # Miscellaneous variable tests.
 
@@ -206,3 +206,14 @@
        @echo ${UNCLOSED.${i}
 .endfor
        @echo $@:end
+
+# 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



Home | Main Index | Thread Index | Old Index