Sun Nov 1 19:02:22 2020 UTC ()
make(1): move test flags to test varmod-match-escape.mk


(rillig)
diff -r1.180 -r1.181 src/usr.bin/make/unit-tests/Makefile
diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-match-escape.exp
diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-match-escape.mk

cvs diff -r1.180 -r1.181 src/usr.bin/make/unit-tests/Makefile (expand / switch to context diff)
--- src/usr.bin/make/unit-tests/Makefile 2020/10/31 20:30:06 1.180
+++ src/usr.bin/make/unit-tests/Makefile 2020/11/01 19:02:22 1.181
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.180 2020/10/31 20:30:06 rillig Exp $
+# $NetBSD: Makefile,v 1.181 2020/11/01 19:02:22 rillig Exp $
 #
 # Unit tests for make(1)
 #
@@ -398,7 +398,6 @@
 FLAGS.order=		-j1
 FLAGS.recursive=	-dL
 FLAGS.sh-leading-plus=	-n
-FLAGS.varmod-match-escape= -dv
 FLAGS.varname-empty=	-dv '$${:U}=cmdline-u' '=cmline-plain'
 
 # Some tests need extra postprocessing.
@@ -438,7 +437,6 @@
 # Some tests need an additional round of postprocessing.
 POSTPROC.deptgt-suffixes= \
 			${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p'
-POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p'
 POSTPROC.varname=	${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p'
 POSTPROC.varname-empty=	${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p'
 

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-match-escape.exp (expand / switch to context diff)
--- src/usr.bin/make/unit-tests/varmod-match-escape.exp 2020/10/25 17:37:36 1.2
+++ src/usr.bin/make/unit-tests/varmod-match-escape.exp 2020/11/01 19:02:22 1.3
@@ -1,5 +1,29 @@
+Var_Parse: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES
+Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Var_Parse: ${:U}\: with VARE_UNDEFERR|VARE_WANTRES
+Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF)
+Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
 Pattern[SPECIALS] for [\: : \\ * \*] is [\:]
+ModifyWords: split "\: : \\ * \*" into 5 words
+VarMatch [\:] [\:]
+VarMatch [:] [\:]
+VarMatch [\\] [\:]
+VarMatch [*] [\:]
+VarMatch [\*] [\:]
+Result of ${SPECIALS:M${:U}\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Var_Parse: ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES
+Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Var_Parse: ${:U} with VARE_UNDEFERR|VARE_WANTRES
+Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF)
+Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
 Pattern[SPECIALS] for [\: : \\ * \*] is [:]
-Pattern[.MAKE.DEPENDFILE] for [.depend] is [/dev/null]
-Pattern[.MAKE.DEPENDFILE] for [.depend] is [no*]
+ModifyWords: split "\: : \\ * \*" into 5 words
+VarMatch [\:] [:]
+VarMatch [:] [:]
+VarMatch [\\] [:]
+VarMatch [*] [:]
+VarMatch [\*] [:]
+Result of ${SPECIALS:M\:${:U}} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, none)
+Global:.MAKEFLAGS =  -r -k -d v -d
+Global:.MAKEFLAGS =  -r -k -d v -d 0
 exit status 0

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-match-escape.mk (expand / switch to context diff)
--- src/usr.bin/make/unit-tests/varmod-match-escape.mk 2020/10/24 08:46:08 1.2
+++ src/usr.bin/make/unit-tests/varmod-match-escape.mk 2020/11/01 19:02:22 1.3
@@ -1,4 +1,4 @@
-# $NetBSD: varmod-match-escape.mk,v 1.2 2020/10/24 08:46:08 rillig Exp $
+# $NetBSD: varmod-match-escape.mk,v 1.3 2020/11/01 19:02:22 rillig Exp $
 #
 # As of 2020-08-01, the :M and :N modifiers interpret backslashes differently,
 # depending on whether there was a variable expression somewhere before the
@@ -10,11 +10,11 @@
 # their plain variants '{', '}' and ':'.  In the pattern matching from
 # Str_Match, only \*, \? or \[ would make a noticeable difference.
 SPECIALS=	\: : \\ * \*
-RELEVANT=	yes
+.MAKEFLAGS: -dv
 .if ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}}
 .  warning unexpected
 .endif
-RELEVANT=	no
+.MAKEFLAGS: -d0
 
 all:
 	@:;