Module Name:    src
Committed By:   rillig
Date:           Sat Oct  3 12:26:11 UTC 2020

Modified Files:
        src/usr.bin/make/unit-tests: opt-debug-lint.exp opt-debug-lint.mk

Log Message:
make(1): add test for variable modifiers without delimiter


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/make/unit-tests/opt-debug-lint.exp \
    src/usr.bin/make/unit-tests/opt-debug-lint.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/unit-tests/opt-debug-lint.exp
diff -u src/usr.bin/make/unit-tests/opt-debug-lint.exp:1.7 src/usr.bin/make/unit-tests/opt-debug-lint.exp:1.8
--- src/usr.bin/make/unit-tests/opt-debug-lint.exp:1.7	Mon Sep 14 21:55:53 2020
+++ src/usr.bin/make/unit-tests/opt-debug-lint.exp	Sat Oct  3 12:26:11 2020
@@ -1,5 +1,6 @@
 make: "opt-debug-lint.mk" line 19: Variable "X" is undefined
 make: "opt-debug-lint.mk" line 41: Variable "UNDEF" is undefined
+make: Unknown modifier '$'
 make: Fatal errors encountered -- cannot continue
 make: stopped in unit-tests
 exit status 1
Index: src/usr.bin/make/unit-tests/opt-debug-lint.mk
diff -u src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.7 src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.8
--- src/usr.bin/make/unit-tests/opt-debug-lint.mk:1.7	Mon Sep 14 21:55:53 2020
+++ src/usr.bin/make/unit-tests/opt-debug-lint.mk	Sat Oct  3 12:26:11 2020
@@ -1,4 +1,4 @@
-# $NetBSD: opt-debug-lint.mk,v 1.7 2020/09/14 21:55:53 rillig Exp $
+# $NetBSD: opt-debug-lint.mk,v 1.8 2020/10/03 12:26:11 rillig Exp $
 #
 # Tests for the -dL command line option, which runs additional checks
 # to catch common mistakes, such as unclosed variable expressions.
@@ -56,5 +56,17 @@ ${UNDEF}: ${UNDEF}
 .  error
 .endif
 
+# Since 2020-10-03, in lint mode the variable modifier must be separated
+# by colons.  See varparse-mod.mk.
+.if ${value:LPL} != "value"
+.  error
+.endif
+
+# Since 2020-10-03, in lint mode the variable modifier must be separated
+# by colons.  See varparse-mod.mk.
+.if ${value:${:UL}PL} != "LPL}"		# FIXME: "LPL}" is unexpected here.
+.  error ${value:${:UL}PL}
+.endif
+
 all:
 	@:;

Reply via email to