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): move test flags to test var...
details: https://anonhg.NetBSD.org/src/rev/be323ac75278
branches: trunk
changeset: 941931:be323ac75278
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 01 19:02:22 2020 +0000
description:
make(1): move test flags to test varmod-match-escape.mk
diffstat:
usr.bin/make/unit-tests/Makefile | 4 +--
usr.bin/make/unit-tests/varmod-match-escape.exp | 28 +++++++++++++++++++++++-
usr.bin/make/unit-tests/varmod-match-escape.mk | 6 ++--
3 files changed, 30 insertions(+), 8 deletions(-)
diffs (83 lines):
diff -r 71541827860b -r be323ac75278 usr.bin/make/unit-tests/Makefile
--- a/usr.bin/make/unit-tests/Makefile Sun Nov 01 18:51:34 2020 +0000
+++ b/usr.bin/make/unit-tests/Makefile Sun Nov 01 19:02:22 2020 +0000
@@ -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'
diff -r 71541827860b -r be323ac75278 usr.bin/make/unit-tests/varmod-match-escape.exp
--- a/usr.bin/make/unit-tests/varmod-match-escape.exp Sun Nov 01 18:51:34 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-match-escape.exp Sun Nov 01 19:02:22 2020 +0000
@@ -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
diff -r 71541827860b -r be323ac75278 usr.bin/make/unit-tests/varmod-match-escape.mk
--- a/usr.bin/make/unit-tests/varmod-match-escape.mk Sun Nov 01 18:51:34 2020 +0000
+++ b/usr.bin/make/unit-tests/varmod-match-escape.mk Sun Nov 01 19:02:22 2020 +0000
@@ -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:
@:;
Home |
Main Index |
Thread Index |
Old Index