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 (switch to unified 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,562 +1,560 @@ @@ -1,562 +1,560 @@
1# $NetBSD: Makefile,v 1.180 2020/10/31 20:30:06 rillig Exp $ 1# $NetBSD: Makefile,v 1.181 2020/11/01 19:02:22 rillig Exp $
2# 2#
3# Unit tests for make(1) 3# Unit tests for make(1)
4# 4#
5# The main targets are: 5# The main targets are:
6# 6#
7# all: 7# all:
8# run all the tests 8# run all the tests
9# test: 9# test:
10# run 'all', and compare to expected results 10# run 'all', and compare to expected results
11# accept: 11# accept:
12# move generated output to expected results 12# move generated output to expected results
13# 13#
14# Settable variables 14# Settable variables
15# 15#
16# TEST_MAKE 16# TEST_MAKE
17# The make program to be tested. 17# The make program to be tested.
18# 18#
19# 19#
20# Adding a test case 20# Adding a test case
21# 21#
22# Each feature should get its own set of tests in its own suitably 22# Each feature should get its own set of tests in its own suitably
23# named makefile (*.mk), with its own set of expected results (*.exp), 23# named makefile (*.mk), with its own set of expected results (*.exp),
24# and it should be added to the TESTS list. 24# and it should be added to the TESTS list.
25# 25#
26# Any added files must also be added to src/distrib/sets/lists/tests/mi. 26# Any added files must also be added to src/distrib/sets/lists/tests/mi.
27# To do that, just run "make sync-mi" in this directory. 27# To do that, just run "make sync-mi" in this directory.
28# 28#
29# A few *.mk files are helper files for other tests (such as include-sub.mk) 29# A few *.mk files are helper files for other tests (such as include-sub.mk)
30# and are thus not added to TESTS. Such files must be ignored in 30# and are thus not added to TESTS. Such files must be ignored in
31# src/tests/usr.bin/make/t_make.sh. 31# src/tests/usr.bin/make/t_make.sh.
32# 32#
33 33
34# Each test is in a sub-makefile. 34# Each test is in a sub-makefile.
35# Keep the list sorted. 35# Keep the list sorted.
36# Any test that is commented out must be ignored in 36# Any test that is commented out must be ignored in
37# src/tests/usr.bin/make/t_make.sh as well. 37# src/tests/usr.bin/make/t_make.sh as well.
38TESTS+= archive 38TESTS+= archive
39TESTS+= archive-suffix 39TESTS+= archive-suffix
40TESTS+= cmd-interrupt 40TESTS+= cmd-interrupt
41TESTS+= cmdline 41TESTS+= cmdline
42TESTS+= comment 42TESTS+= comment
43TESTS+= cond-cmp-numeric 43TESTS+= cond-cmp-numeric
44TESTS+= cond-cmp-numeric-eq 44TESTS+= cond-cmp-numeric-eq
45TESTS+= cond-cmp-numeric-ge 45TESTS+= cond-cmp-numeric-ge
46TESTS+= cond-cmp-numeric-gt 46TESTS+= cond-cmp-numeric-gt
47TESTS+= cond-cmp-numeric-le 47TESTS+= cond-cmp-numeric-le
48TESTS+= cond-cmp-numeric-lt 48TESTS+= cond-cmp-numeric-lt
49TESTS+= cond-cmp-numeric-ne 49TESTS+= cond-cmp-numeric-ne
50TESTS+= cond-cmp-string 50TESTS+= cond-cmp-string
51TESTS+= cond-cmp-unary 51TESTS+= cond-cmp-unary
52TESTS+= cond-func 52TESTS+= cond-func
53TESTS+= cond-func-commands 53TESTS+= cond-func-commands
54TESTS+= cond-func-defined 54TESTS+= cond-func-defined
55TESTS+= cond-func-empty 55TESTS+= cond-func-empty
56TESTS+= cond-func-exists 56TESTS+= cond-func-exists
57TESTS+= cond-func-make 57TESTS+= cond-func-make
58TESTS+= cond-func-target 58TESTS+= cond-func-target
59TESTS+= cond-late 59TESTS+= cond-late
60TESTS+= cond-op 60TESTS+= cond-op
61TESTS+= cond-op-and 61TESTS+= cond-op-and
62TESTS+= cond-op-not 62TESTS+= cond-op-not
63TESTS+= cond-op-or 63TESTS+= cond-op-or
64TESTS+= cond-op-parentheses 64TESTS+= cond-op-parentheses
65TESTS+= cond-short 65TESTS+= cond-short
66TESTS+= cond-token-number 66TESTS+= cond-token-number
67TESTS+= cond-token-plain 67TESTS+= cond-token-plain
68TESTS+= cond-token-string 68TESTS+= cond-token-string
69TESTS+= cond-token-var 69TESTS+= cond-token-var
70TESTS+= cond-undef-lint 70TESTS+= cond-undef-lint
71TESTS+= cond1 71TESTS+= cond1
72TESTS+= counter 72TESTS+= counter
73TESTS+= counter-append 73TESTS+= counter-append
74TESTS+= dep 74TESTS+= dep
75TESTS+= dep-colon 75TESTS+= dep-colon
76TESTS+= dep-colon-bug-cross-file 76TESTS+= dep-colon-bug-cross-file
77TESTS+= dep-double-colon 77TESTS+= dep-double-colon
78TESTS+= dep-double-colon-indep 78TESTS+= dep-double-colon-indep
79TESTS+= dep-exclam 79TESTS+= dep-exclam
80TESTS+= dep-none 80TESTS+= dep-none
81TESTS+= dep-percent 81TESTS+= dep-percent
82TESTS+= dep-var 82TESTS+= dep-var
83TESTS+= dep-wildcards 83TESTS+= dep-wildcards
84TESTS+= depsrc 84TESTS+= depsrc
85TESTS+= depsrc-end 85TESTS+= depsrc-end
86TESTS+= depsrc-exec 86TESTS+= depsrc-exec
87TESTS+= depsrc-ignore 87TESTS+= depsrc-ignore
88TESTS+= depsrc-made 88TESTS+= depsrc-made
89TESTS+= depsrc-make 89TESTS+= depsrc-make
90TESTS+= depsrc-meta 90TESTS+= depsrc-meta
91TESTS+= depsrc-nometa 91TESTS+= depsrc-nometa
92TESTS+= depsrc-nometa_cmp 92TESTS+= depsrc-nometa_cmp
93TESTS+= depsrc-nopath 93TESTS+= depsrc-nopath
94TESTS+= depsrc-notmain 94TESTS+= depsrc-notmain
95TESTS+= depsrc-optional 95TESTS+= depsrc-optional
96TESTS+= depsrc-phony 96TESTS+= depsrc-phony
97TESTS+= depsrc-precious 97TESTS+= depsrc-precious
98TESTS+= depsrc-recursive 98TESTS+= depsrc-recursive
99TESTS+= depsrc-silent 99TESTS+= depsrc-silent
100TESTS+= depsrc-use 100TESTS+= depsrc-use
101TESTS+= depsrc-usebefore 101TESTS+= depsrc-usebefore
102TESTS+= depsrc-usebefore-double-colon 102TESTS+= depsrc-usebefore-double-colon
103TESTS+= depsrc-wait 103TESTS+= depsrc-wait
104TESTS+= deptgt 104TESTS+= deptgt
105TESTS+= deptgt-begin 105TESTS+= deptgt-begin
106TESTS+= deptgt-default 106TESTS+= deptgt-default
107TESTS+= deptgt-delete_on_error 107TESTS+= deptgt-delete_on_error
108TESTS+= deptgt-end 108TESTS+= deptgt-end
109TESTS+= deptgt-end-jobs 109TESTS+= deptgt-end-jobs
110TESTS+= deptgt-error 110TESTS+= deptgt-error
111TESTS+= deptgt-ignore 111TESTS+= deptgt-ignore
112TESTS+= deptgt-interrupt 112TESTS+= deptgt-interrupt
113TESTS+= deptgt-main 113TESTS+= deptgt-main
114TESTS+= deptgt-makeflags 114TESTS+= deptgt-makeflags
115TESTS+= deptgt-no_parallel 115TESTS+= deptgt-no_parallel
116TESTS+= deptgt-nopath 116TESTS+= deptgt-nopath
117TESTS+= deptgt-notparallel 117TESTS+= deptgt-notparallel
118TESTS+= deptgt-objdir 118TESTS+= deptgt-objdir
119TESTS+= deptgt-order 119TESTS+= deptgt-order
120TESTS+= deptgt-path 120TESTS+= deptgt-path
121TESTS+= deptgt-path-suffix 121TESTS+= deptgt-path-suffix
122TESTS+= deptgt-phony 122TESTS+= deptgt-phony
123TESTS+= deptgt-precious 123TESTS+= deptgt-precious
124TESTS+= deptgt-shell 124TESTS+= deptgt-shell
125TESTS+= deptgt-silent 125TESTS+= deptgt-silent
126TESTS+= deptgt-stale 126TESTS+= deptgt-stale
127TESTS+= deptgt-suffixes 127TESTS+= deptgt-suffixes
128TESTS+= dir 128TESTS+= dir
129TESTS+= dir-expand-path 129TESTS+= dir-expand-path
130TESTS+= directive 130TESTS+= directive
131TESTS+= directive-dinclude 131TESTS+= directive-dinclude
132TESTS+= directive-elif 132TESTS+= directive-elif
133TESTS+= directive-elifdef 133TESTS+= directive-elifdef
134TESTS+= directive-elifmake 134TESTS+= directive-elifmake
135TESTS+= directive-elifndef 135TESTS+= directive-elifndef
136TESTS+= directive-elifnmake 136TESTS+= directive-elifnmake
137TESTS+= directive-else 137TESTS+= directive-else
138TESTS+= directive-endif 138TESTS+= directive-endif
139TESTS+= directive-error 139TESTS+= directive-error
140TESTS+= directive-export 140TESTS+= directive-export
141TESTS+= directive-export-env 141TESTS+= directive-export-env
142TESTS+= directive-export-gmake 142TESTS+= directive-export-gmake
143TESTS+= directive-export-literal 143TESTS+= directive-export-literal
144TESTS+= directive-for 144TESTS+= directive-for
145TESTS+= directive-for-generating-endif 145TESTS+= directive-for-generating-endif
146TESTS+= directive-hyphen-include 146TESTS+= directive-hyphen-include
147TESTS+= directive-if 147TESTS+= directive-if
148TESTS+= directive-ifdef 148TESTS+= directive-ifdef
149TESTS+= directive-ifmake 149TESTS+= directive-ifmake
150TESTS+= directive-ifndef 150TESTS+= directive-ifndef
151TESTS+= directive-ifnmake 151TESTS+= directive-ifnmake
152TESTS+= directive-include 152TESTS+= directive-include
153TESTS+= directive-include-fatal 153TESTS+= directive-include-fatal
154TESTS+= directive-info 154TESTS+= directive-info
155TESTS+= directive-sinclude 155TESTS+= directive-sinclude
156TESTS+= directive-undef 156TESTS+= directive-undef
157TESTS+= directive-unexport 157TESTS+= directive-unexport
158TESTS+= directive-unexport-env 158TESTS+= directive-unexport-env
159TESTS+= directive-warning 159TESTS+= directive-warning
160TESTS+= directives 160TESTS+= directives
161TESTS+= dollar 161TESTS+= dollar
162TESTS+= doterror 162TESTS+= doterror
163TESTS+= dotwait 163TESTS+= dotwait
164TESTS+= envfirst 164TESTS+= envfirst
165TESTS+= error 165TESTS+= error
166TESTS+= # escape # broken by reverting POSIX changes 166TESTS+= # escape # broken by reverting POSIX changes
167TESTS+= export 167TESTS+= export
168TESTS+= export-all 168TESTS+= export-all
169TESTS+= export-env 169TESTS+= export-env
170TESTS+= export-variants 170TESTS+= export-variants
171TESTS+= forloop 171TESTS+= forloop
172TESTS+= forsubst 172TESTS+= forsubst
173TESTS+= hanoi-include 173TESTS+= hanoi-include
174TESTS+= impsrc 174TESTS+= impsrc
175TESTS+= include-main 175TESTS+= include-main
176TESTS+= job-output-long-lines 176TESTS+= job-output-long-lines
177TESTS+= lint 177TESTS+= lint
178TESTS+= make-exported 178TESTS+= make-exported
179TESTS+= moderrs 179TESTS+= moderrs
180TESTS+= modmatch 180TESTS+= modmatch
181TESTS+= modmisc 181TESTS+= modmisc
182TESTS+= modts 182TESTS+= modts
183TESTS+= modword 183TESTS+= modword
184TESTS+= opt 184TESTS+= opt
185TESTS+= opt-backwards 185TESTS+= opt-backwards
186TESTS+= opt-chdir 186TESTS+= opt-chdir
187TESTS+= opt-debug 187TESTS+= opt-debug
188TESTS+= opt-debug-all 188TESTS+= opt-debug-all
189TESTS+= opt-debug-archive 189TESTS+= opt-debug-archive
190TESTS+= opt-debug-curdir 190TESTS+= opt-debug-curdir
191TESTS+= opt-debug-cond 191TESTS+= opt-debug-cond
192TESTS+= opt-debug-dir 192TESTS+= opt-debug-dir
193TESTS+= opt-debug-errors 193TESTS+= opt-debug-errors
194TESTS+= opt-debug-file 194TESTS+= opt-debug-file
195TESTS+= opt-debug-for 195TESTS+= opt-debug-for
196TESTS+= opt-debug-graph1 196TESTS+= opt-debug-graph1
197TESTS+= opt-debug-graph2 197TESTS+= opt-debug-graph2
198TESTS+= opt-debug-graph3 198TESTS+= opt-debug-graph3
199TESTS+= opt-debug-hash 199TESTS+= opt-debug-hash
200TESTS+= opt-debug-jobs 200TESTS+= opt-debug-jobs
201TESTS+= opt-debug-lint 201TESTS+= opt-debug-lint
202TESTS+= opt-debug-loud 202TESTS+= opt-debug-loud
203TESTS+= opt-debug-meta 203TESTS+= opt-debug-meta
204TESTS+= opt-debug-making 204TESTS+= opt-debug-making
205TESTS+= opt-debug-no-rm 205TESTS+= opt-debug-no-rm
206TESTS+= opt-debug-parse 206TESTS+= opt-debug-parse
207TESTS+= opt-debug-suff 207TESTS+= opt-debug-suff
208TESTS+= opt-debug-targets 208TESTS+= opt-debug-targets
209TESTS+= opt-debug-varraw 209TESTS+= opt-debug-varraw
210TESTS+= opt-debug-var 210TESTS+= opt-debug-var
211TESTS+= opt-debug-x-trace 211TESTS+= opt-debug-x-trace
212TESTS+= opt-define 212TESTS+= opt-define
213TESTS+= opt-env 213TESTS+= opt-env
214TESTS+= opt-file 214TESTS+= opt-file
215TESTS+= opt-ignore 215TESTS+= opt-ignore
216TESTS+= opt-include-dir 216TESTS+= opt-include-dir
217TESTS+= opt-jobs 217TESTS+= opt-jobs
218TESTS+= opt-jobs-internal 218TESTS+= opt-jobs-internal
219TESTS+= opt-keep-going 219TESTS+= opt-keep-going
220TESTS+= opt-m-include-dir 220TESTS+= opt-m-include-dir
221TESTS+= opt-no-action 221TESTS+= opt-no-action
222TESTS+= opt-no-action-at-all 222TESTS+= opt-no-action-at-all
223TESTS+= opt-query 223TESTS+= opt-query
224TESTS+= opt-raw 224TESTS+= opt-raw
225TESTS+= opt-silent 225TESTS+= opt-silent
226TESTS+= opt-touch 226TESTS+= opt-touch
227TESTS+= opt-tracefile 227TESTS+= opt-tracefile
228TESTS+= opt-var-expanded 228TESTS+= opt-var-expanded
229TESTS+= opt-var-literal 229TESTS+= opt-var-literal
230TESTS+= opt-warnings-as-errors 230TESTS+= opt-warnings-as-errors
231TESTS+= opt-where-am-i 231TESTS+= opt-where-am-i
232TESTS+= opt-x-reduce-exported 232TESTS+= opt-x-reduce-exported
233TESTS+= order 233TESTS+= order
234TESTS+= parse-var 234TESTS+= parse-var
235TESTS+= phony-end 235TESTS+= phony-end
236TESTS+= posix 236TESTS+= posix
237TESTS+= # posix1 # broken by reverting POSIX changes 237TESTS+= # posix1 # broken by reverting POSIX changes
238TESTS+= qequals 238TESTS+= qequals
239TESTS+= recursive 239TESTS+= recursive
240TESTS+= sh 240TESTS+= sh
241TESTS+= sh-dots 241TESTS+= sh-dots
242TESTS+= sh-jobs 242TESTS+= sh-jobs
243TESTS+= sh-jobs-error 243TESTS+= sh-jobs-error
244TESTS+= sh-leading-at 244TESTS+= sh-leading-at
245TESTS+= sh-leading-hyphen 245TESTS+= sh-leading-hyphen
246TESTS+= sh-leading-plus 246TESTS+= sh-leading-plus
247TESTS+= sh-meta-chars 247TESTS+= sh-meta-chars
248TESTS+= sh-multi-line 248TESTS+= sh-multi-line
249TESTS+= sh-single-line 249TESTS+= sh-single-line
250TESTS+= shell-csh 250TESTS+= shell-csh
251TESTS+= shell-custom 251TESTS+= shell-custom
252TESTS+= shell-ksh 252TESTS+= shell-ksh
253TESTS+= shell-sh 253TESTS+= shell-sh
254TESTS+= suff-add-later 254TESTS+= suff-add-later
255TESTS+= suff-clear-regular 255TESTS+= suff-clear-regular
256TESTS+= suff-clear-single 256TESTS+= suff-clear-single
257TESTS+= suff-lookup 257TESTS+= suff-lookup
258TESTS+= suff-main 258TESTS+= suff-main
259TESTS+= suff-rebuild 259TESTS+= suff-rebuild
260TESTS+= suff-transform-endless 260TESTS+= suff-transform-endless
261TESTS+= suff-transform-expand 261TESTS+= suff-transform-expand
262TESTS+= suff-transform-select 262TESTS+= suff-transform-select
263TESTS+= sunshcmd 263TESTS+= sunshcmd
264TESTS+= ternary 264TESTS+= ternary
265TESTS+= unexport 265TESTS+= unexport
266TESTS+= unexport-env 266TESTS+= unexport-env
267TESTS+= use-inference 267TESTS+= use-inference
268TESTS+= var-class 268TESTS+= var-class
269TESTS+= var-class-cmdline 269TESTS+= var-class-cmdline
270TESTS+= var-class-env 270TESTS+= var-class-env
271TESTS+= var-class-global 271TESTS+= var-class-global
272TESTS+= var-class-local 272TESTS+= var-class-local
273TESTS+= var-class-local-legacy 273TESTS+= var-class-local-legacy
274TESTS+= var-op 274TESTS+= var-op
275TESTS+= var-op-append 275TESTS+= var-op-append
276TESTS+= var-op-assign 276TESTS+= var-op-assign
277TESTS+= var-op-default 277TESTS+= var-op-default
278TESTS+= var-op-expand 278TESTS+= var-op-expand
279TESTS+= var-op-shell 279TESTS+= var-op-shell
280TESTS+= var-op-sunsh 280TESTS+= var-op-sunsh
281TESTS+= var-recursive 281TESTS+= var-recursive
282TESTS+= varcmd 282TESTS+= varcmd
283TESTS+= vardebug 283TESTS+= vardebug
284TESTS+= varfind 284TESTS+= varfind
285TESTS+= varmisc 285TESTS+= varmisc
286TESTS+= varmod 286TESTS+= varmod
287TESTS+= varmod-assign 287TESTS+= varmod-assign
288TESTS+= varmod-defined 288TESTS+= varmod-defined
289TESTS+= varmod-edge 289TESTS+= varmod-edge
290TESTS+= varmod-exclam-shell 290TESTS+= varmod-exclam-shell
291TESTS+= varmod-extension 291TESTS+= varmod-extension
292TESTS+= varmod-gmtime 292TESTS+= varmod-gmtime
293TESTS+= varmod-hash 293TESTS+= varmod-hash
294TESTS+= varmod-head 294TESTS+= varmod-head
295TESTS+= varmod-ifelse 295TESTS+= varmod-ifelse
296TESTS+= varmod-l-name-to-value 296TESTS+= varmod-l-name-to-value
297TESTS+= varmod-localtime 297TESTS+= varmod-localtime
298TESTS+= varmod-loop 298TESTS+= varmod-loop
299TESTS+= varmod-match 299TESTS+= varmod-match
300TESTS+= varmod-match-escape 300TESTS+= varmod-match-escape
301TESTS+= varmod-no-match 301TESTS+= varmod-no-match
302TESTS+= varmod-order 302TESTS+= varmod-order
303TESTS+= varmod-order-reverse 303TESTS+= varmod-order-reverse
304TESTS+= varmod-order-shuffle 304TESTS+= varmod-order-shuffle
305TESTS+= varmod-path 305TESTS+= varmod-path
306TESTS+= varmod-quote 306TESTS+= varmod-quote
307TESTS+= varmod-quote-dollar 307TESTS+= varmod-quote-dollar
308TESTS+= varmod-range 308TESTS+= varmod-range
309TESTS+= varmod-remember 309TESTS+= varmod-remember
310TESTS+= varmod-root 310TESTS+= varmod-root
311TESTS+= varmod-select-words 311TESTS+= varmod-select-words
312TESTS+= varmod-shell 312TESTS+= varmod-shell
313TESTS+= varmod-subst 313TESTS+= varmod-subst
314TESTS+= varmod-subst-regex 314TESTS+= varmod-subst-regex
315TESTS+= varmod-sysv 315TESTS+= varmod-sysv
316TESTS+= varmod-tail 316TESTS+= varmod-tail
317TESTS+= varmod-to-abs 317TESTS+= varmod-to-abs
318TESTS+= varmod-to-lower 318TESTS+= varmod-to-lower
319TESTS+= varmod-to-many-words 319TESTS+= varmod-to-many-words
320TESTS+= varmod-to-one-word 320TESTS+= varmod-to-one-word
321TESTS+= varmod-to-separator 321TESTS+= varmod-to-separator
322TESTS+= varmod-to-upper 322TESTS+= varmod-to-upper
323TESTS+= varmod-undefined 323TESTS+= varmod-undefined
324TESTS+= varmod-unique 324TESTS+= varmod-unique
325TESTS+= varname 325TESTS+= varname
326TESTS+= varname-dollar 326TESTS+= varname-dollar
327TESTS+= varname-dot-alltargets 327TESTS+= varname-dot-alltargets
328TESTS+= varname-dot-curdir 328TESTS+= varname-dot-curdir
329TESTS+= varname-dot-includes 329TESTS+= varname-dot-includes
330TESTS+= varname-dot-includedfromdir 330TESTS+= varname-dot-includedfromdir
331TESTS+= varname-dot-includedfromfile 331TESTS+= varname-dot-includedfromfile
332TESTS+= varname-dot-libs 332TESTS+= varname-dot-libs
333TESTS+= varname-dot-make-dependfile 333TESTS+= varname-dot-make-dependfile
334TESTS+= varname-dot-make-expand_variables 334TESTS+= varname-dot-make-expand_variables
335TESTS+= varname-dot-make-exported 335TESTS+= varname-dot-make-exported
336TESTS+= varname-dot-make-jobs 336TESTS+= varname-dot-make-jobs
337TESTS+= varname-dot-make-jobs-prefix 337TESTS+= varname-dot-make-jobs-prefix
338TESTS+= varname-dot-make-level 338TESTS+= varname-dot-make-level
339TESTS+= varname-dot-make-makefile_preference 339TESTS+= varname-dot-make-makefile_preference
340TESTS+= varname-dot-make-makefiles 340TESTS+= varname-dot-make-makefiles
341TESTS+= varname-dot-make-meta-bailiwick 341TESTS+= varname-dot-make-meta-bailiwick
342TESTS+= varname-dot-make-meta-created 342TESTS+= varname-dot-make-meta-created
343TESTS+= varname-dot-make-meta-files 343TESTS+= varname-dot-make-meta-files
344TESTS+= varname-dot-make-meta-ignore_filter 344TESTS+= varname-dot-make-meta-ignore_filter
345TESTS+= varname-dot-make-meta-ignore_paths 345TESTS+= varname-dot-make-meta-ignore_paths
346TESTS+= varname-dot-make-meta-ignore_patterns 346TESTS+= varname-dot-make-meta-ignore_patterns
347TESTS+= varname-dot-make-meta-prefix 347TESTS+= varname-dot-make-meta-prefix
348TESTS+= varname-dot-make-mode 348TESTS+= varname-dot-make-mode
349TESTS+= varname-dot-make-path_filemon 349TESTS+= varname-dot-make-path_filemon
350TESTS+= varname-dot-make-pid 350TESTS+= varname-dot-make-pid
351TESTS+= varname-dot-make-ppid 351TESTS+= varname-dot-make-ppid
352TESTS+= varname-dot-make-save_dollars 352TESTS+= varname-dot-make-save_dollars
353TESTS+= varname-dot-makeoverrides 353TESTS+= varname-dot-makeoverrides
354TESTS+= varname-dot-newline 354TESTS+= varname-dot-newline
355TESTS+= varname-dot-objdir 355TESTS+= varname-dot-objdir
356TESTS+= varname-dot-parsedir 356TESTS+= varname-dot-parsedir
357TESTS+= varname-dot-parsefile 357TESTS+= varname-dot-parsefile
358TESTS+= varname-dot-path 358TESTS+= varname-dot-path
359TESTS+= varname-dot-shell 359TESTS+= varname-dot-shell
360TESTS+= varname-dot-targets 360TESTS+= varname-dot-targets
361TESTS+= varname-empty 361TESTS+= varname-empty
362TESTS+= varname-make 362TESTS+= varname-make
363TESTS+= varname-make_print_var_on_error 363TESTS+= varname-make_print_var_on_error
364TESTS+= varname-make_print_var_on_error-jobs 364TESTS+= varname-make_print_var_on_error-jobs
365TESTS+= varname-makefile 365TESTS+= varname-makefile
366TESTS+= varname-makeflags 366TESTS+= varname-makeflags
367TESTS+= varname-pwd 367TESTS+= varname-pwd
368TESTS+= varname-vpath 368TESTS+= varname-vpath
369TESTS+= varparse-dynamic 369TESTS+= varparse-dynamic
370TESTS+= varparse-mod 370TESTS+= varparse-mod
371TESTS+= varparse-undef-partial 371TESTS+= varparse-undef-partial
372TESTS+= varquote 372TESTS+= varquote
373TESTS+= varshell 373TESTS+= varshell
374 374
375# Additional environment variables for some of the tests. 375# Additional environment variables for some of the tests.
376# The base environment is -i PATH="$PATH". 376# The base environment is -i PATH="$PATH".
377ENV.envfirst= FROM_ENV=value-from-env 377ENV.envfirst= FROM_ENV=value-from-env
378ENV.varmisc= FROM_ENV=env 378ENV.varmisc= FROM_ENV=env
379ENV.varmisc+= FROM_ENV_BEFORE=env 379ENV.varmisc+= FROM_ENV_BEFORE=env
380ENV.varmisc+= FROM_ENV_AFTER=env 380ENV.varmisc+= FROM_ENV_AFTER=env
381ENV.varmod-localtime+= TZ=Europe/Berlin 381ENV.varmod-localtime+= TZ=Europe/Berlin
382 382
383# Override make flags for some of the tests; default is -k. 383# Override make flags for some of the tests; default is -k.
384# If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of 384# If possible, write ".MAKEFLAGS: -dv" in the test .mk file instead of
385# settings FLAGS.test=-dv here, since that is closer to the test code. 385# settings FLAGS.test=-dv here, since that is closer to the test code.
386FLAGS.cond-func-make= via-cmdline 386FLAGS.cond-func-make= via-cmdline
387FLAGS.directive-ifmake= first second 387FLAGS.directive-ifmake= first second
388FLAGS.doterror= # none 388FLAGS.doterror= # none
389FLAGS.envfirst= -e 389FLAGS.envfirst= -e
390FLAGS.export= # none 390FLAGS.export= # none
391FLAGS.opt-ignore= -i 391FLAGS.opt-ignore= -i
392FLAGS.opt-keep-going= -k 392FLAGS.opt-keep-going= -k
393FLAGS.opt-no-action= -n 393FLAGS.opt-no-action= -n
394FLAGS.opt-query= -q 394FLAGS.opt-query= -q
395FLAGS.opt-var-expanded= -v VAR -v VALUE 395FLAGS.opt-var-expanded= -v VAR -v VALUE
396FLAGS.opt-var-literal= -V VAR -V VALUE 396FLAGS.opt-var-literal= -V VAR -V VALUE
397FLAGS.opt-warnings-as-errors= -W 397FLAGS.opt-warnings-as-errors= -W
398FLAGS.order= -j1 398FLAGS.order= -j1
399FLAGS.recursive= -dL 399FLAGS.recursive= -dL
400FLAGS.sh-leading-plus= -n 400FLAGS.sh-leading-plus= -n
401FLAGS.varmod-match-escape= -dv 
402FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain' 401FLAGS.varname-empty= -dv '$${:U}=cmdline-u' '=cmline-plain'
403 402
404# Some tests need extra postprocessing. 403# Some tests need extra postprocessing.
405SED_CMDS.job-output-long-lines= \ 404SED_CMDS.job-output-long-lines= \
406 ${:D Job separators on their own line are ok. } \ 405 ${:D Job separators on their own line are ok. } \
407 -e '/^--- job-[ab] ---$$/d' \ 406 -e '/^--- job-[ab] ---$$/d' \
408 ${:D Plain output lines are ok as well. } \ 407 ${:D Plain output lines are ok as well. } \
409 ${:D They may come in multiples of 1024 or as 10000. } \ 408 ${:D They may come in multiples of 1024 or as 10000. } \
410 -e '/^aa*$$/d' \ 409 -e '/^aa*$$/d' \
411 -e '/^bb*$$/d' \ 410 -e '/^bb*$$/d' \
412 ${:D The following lines should rather not occur since the job } \ 411 ${:D The following lines should rather not occur since the job } \
413 ${:D marker should always be at the beginning of the line. } \ 412 ${:D marker should always be at the beginning of the line. } \
414 -e '/^aa*--- job-b ---$$/d' \ 413 -e '/^aa*--- job-b ---$$/d' \
415 -e '/^bb*--- job-a ---$$/d' 414 -e '/^bb*--- job-a ---$$/d'
416SED_CMDS.opt-debug-graph1= \ 415SED_CMDS.opt-debug-graph1= \
417 -e 's,${.CURDIR},CURDIR,' 416 -e 's,${.CURDIR},CURDIR,'
418SED_CMDS.opt-debug-graph1+= \ 417SED_CMDS.opt-debug-graph1+= \
419 -e '/Global Variables:/,/Suffixes:/d' 418 -e '/Global Variables:/,/Suffixes:/d'
420SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<normalized: ...: not found>,' 419SED_CMDS.sh-dots= -e 's,^.*\.\.\.:.*,<normalized: ...: not found>,'
421SED_CMDS.opt-debug-jobs= -e 's,([0-9][0-9]*),(<pid>),' 420SED_CMDS.opt-debug-jobs= -e 's,([0-9][0-9]*),(<pid>),'
422SED_CMDS.opt-debug-jobs+= -e 's,pid [0-9][0-9]*,pid <pid>,' 421SED_CMDS.opt-debug-jobs+= -e 's,pid [0-9][0-9]*,pid <pid>,'
423SED_CMDS.opt-debug-jobs+= -e 's,Process [0-9][0-9]*,Process <pid>,' 422SED_CMDS.opt-debug-jobs+= -e 's,Process [0-9][0-9]*,Process <pid>,'
424SED_CMDS.opt-debug-jobs+= -e 's,JobFinish: [0-9][0-9]*,JobFinish: <pid>,' 423SED_CMDS.opt-debug-jobs+= -e 's,JobFinish: [0-9][0-9]*,JobFinish: <pid>,'
425# The "-q" may be there or not, see jobs.c, variable shells. 424# The "-q" may be there or not, see jobs.c, variable shells.
426SED_CMDS.opt-debug-jobs+= -e 's,^\(.Command: sh\) -q,\1,' 425SED_CMDS.opt-debug-jobs+= -e 's,^\(.Command: sh\) -q,\1,'
427SED_CMDS.varmod-subst-regex+= \ 426SED_CMDS.varmod-subst-regex+= \
428 -e 's,\(Regex compilation error:\).*,\1 (details omitted),' 427 -e 's,\(Regex compilation error:\).*,\1 (details omitted),'
429SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,' 428SED_CMDS.varmod-edge+= -e 's, line [0-9]*:, line omitted:,'
430SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,' 429SED_CMDS.varshell+= -e 's,^${.SHELL:T}: ,,'
431SED_CMDS.varshell+= -e '/command/s,No such.*,not found,' 430SED_CMDS.varshell+= -e '/command/s,No such.*,not found,'
432SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' 431SED_CMDS.varname-dot-parsedir= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,'
433SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,' 432SED_CMDS.varname-dot-parsefile= -e '/in some cases/ s,^make: "[^"]*,make: "<normalized>,'
434SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g' 433SED_CMDS.varname-dot-shell= -e 's, = /[^ ]*, = (details omitted),g'
435SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g' 434SED_CMDS.varname-dot-shell+= -e 's,"/[^" ]*","(details omitted)",g'
436SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g' 435SED_CMDS.varname-dot-shell+= -e 's,\[/[^] ]*\],[(details omitted)],g'
437 436
438# Some tests need an additional round of postprocessing. 437# Some tests need an additional round of postprocessing.
439POSTPROC.deptgt-suffixes= \ 438POSTPROC.deptgt-suffixes= \
440 ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p' 439 ${TOOL_SED} -n -e '/^\#\*\*\* Suffixes/,/^\#\*/p'
441POSTPROC.varmod-match-escape= ${TOOL_SED} -n -e '/^Pattern/p' 
442POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p' 440POSTPROC.varname= ${TOOL_SED} -n -e '/^MAGIC/p' -e '/^ORDER_/p'
443POSTPROC.varname-empty= ${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p' 441POSTPROC.varname-empty= ${TOOL_SED} -n -e '/^Var_Set/p' -e '/^out:/p'
444 442
445# Some tests reuse other tests, which makes them unnecessarily fragile. 443# Some tests reuse other tests, which makes them unnecessarily fragile.
446export-all.rawout: export.mk 444export-all.rawout: export.mk
447unexport.rawout: export.mk 445unexport.rawout: export.mk
448unexport-env.rawout: export.mk 446unexport-env.rawout: export.mk
449 447
450# End of the configuration section. 448# End of the configuration section.
451 449
452.MAIN: all 450.MAIN: all
453 451
454UNIT_TESTS:= ${.PARSEDIR} 452UNIT_TESTS:= ${.PARSEDIR}
455.PATH: ${UNIT_TESTS} 453.PATH: ${UNIT_TESTS}
456 454
457.if ${USE_ABSOLUTE_TESTNAMES:Uno} == yes 455.if ${USE_ABSOLUTE_TESTNAMES:Uno} == yes
458OUTFILES= ${TESTS:@test@${.CURDIR:tA}/${test}.out@} 456OUTFILES= ${TESTS:@test@${.CURDIR:tA}/${test}.out@}
459.else 457.else
460OUTFILES= ${TESTS:=.out} 458OUTFILES= ${TESTS:=.out}
461.endif 459.endif
462 460
463all: ${OUTFILES} 461all: ${OUTFILES}
464 462
465CLEANFILES= *.rawout *.out *.status *.tmp *.core *.tmp 463CLEANFILES= *.rawout *.out *.status *.tmp *.core *.tmp
466CLEANFILES+= obj*.[och] lib*.a # posix1.mk 464CLEANFILES+= obj*.[och] lib*.a # posix1.mk
467CLEANFILES+= issue* .[ab]* # suffixes.mk 465CLEANFILES+= issue* .[ab]* # suffixes.mk
468CLEANDIRS= dir dummy # posix1.mk 466CLEANDIRS= dir dummy # posix1.mk
469 467
470clean: 468clean:
471 rm -f ${CLEANFILES} 469 rm -f ${CLEANFILES}
472 rm -rf ${CLEANDIRS} 470 rm -rf ${CLEANDIRS}
473 471
474TEST_MAKE?= ${.MAKE} 472TEST_MAKE?= ${.MAKE}
475TOOL_SED?= sed 473TOOL_SED?= sed
476 474
477# ensure consistent results from sort(1) 475# ensure consistent results from sort(1)
478LC_ALL= C 476LC_ALL= C
479LANG= C 477LANG= C
480.export LANG LC_ALL 478.export LANG LC_ALL
481 479
482MAKE_TEST_ENV?= MALLOC_OPTIONS="JA" # for jemalloc 480MAKE_TEST_ENV?= MALLOC_OPTIONS="JA" # for jemalloc
483 481
484# Each test is run in a sub-make, to keep the tests for interfering with 482# Each test is run in a sub-make, to keep the tests for interfering with
485# each other, and because they use different environment variables and 483# each other, and because they use different environment variables and
486# command line options. 484# command line options.
487.SUFFIXES: .mk .rawout .out 485.SUFFIXES: .mk .rawout .out
488.mk.rawout: 486.mk.rawout:
489 @${_MKMSG_TEST:Uecho '# test '} ${.PREFIX} 487 @${_MKMSG_TEST:Uecho '# test '} ${.PREFIX}
490 @set -eu; \ 488 @set -eu; \
491 cd ${.OBJDIR}; \ 489 cd ${.OBJDIR}; \
492 env -i PATH="$$PATH" ${MAKE_TEST_ENV} ${ENV.${.PREFIX:T}} \ 490 env -i PATH="$$PATH" ${MAKE_TEST_ENV} ${ENV.${.PREFIX:T}} \
493 ${TEST_MAKE} \ 491 ${TEST_MAKE} \
494 -r -C ${.CURDIR} -f ${.IMPSRC} \ 492 -r -C ${.CURDIR} -f ${.IMPSRC} \
495 ${FLAGS.${.PREFIX:T}:U-k} \ 493 ${FLAGS.${.PREFIX:T}:U-k} \
496 > ${.TARGET}.tmp 2>&1 \ 494 > ${.TARGET}.tmp 2>&1 \
497 && status=$$? || status=$$?; \ 495 && status=$$? || status=$$?; \
498 echo $$status > ${.TARGET:R}.status 496 echo $$status > ${.TARGET:R}.status
499 @mv ${.TARGET}.tmp ${.TARGET} 497 @mv ${.TARGET}.tmp ${.TARGET}
500 498
501# Postprocess the test output so that the results can be compared. 499# Postprocess the test output so that the results can be compared.
502# 500#
503# always pretend .MAKE was called 'make' 501# always pretend .MAKE was called 'make'
504_SED_CMDS+= -e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,' 502_SED_CMDS+= -e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,'
505_SED_CMDS+= -e 's,${TEST_MAKE:S,.,\\.,g},make,' 503_SED_CMDS+= -e 's,${TEST_MAKE:S,.,\\.,g},make,'
506# replace anything after 'stopped in' with unit-tests 504# replace anything after 'stopped in' with unit-tests
507_SED_CMDS+= -e '/stopped/s, /.*, unit-tests,' 505_SED_CMDS+= -e '/stopped/s, /.*, unit-tests,'
508# strip ${.CURDIR}/ from the output 506# strip ${.CURDIR}/ from the output
509_SED_CMDS+= -e 's,${.CURDIR:S,.,\\.,g}/,,g' 507_SED_CMDS+= -e 's,${.CURDIR:S,.,\\.,g}/,,g'
510_SED_CMDS+= -e 's,${UNIT_TESTS:S,.,\\.,g}/,,g' 508_SED_CMDS+= -e 's,${UNIT_TESTS:S,.,\\.,g}/,,g'
511 509
512.rawout.out: 510.rawout.out:
513 @${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.PREFIX:T}} \ 511 @${TOOL_SED} ${_SED_CMDS} ${SED_CMDS.${.PREFIX:T}} \
514 < ${.IMPSRC} > ${.TARGET}.tmp1 512 < ${.IMPSRC} > ${.TARGET}.tmp1
515 @${POSTPROC.${.PREFIX:T}:Ucat} < ${.TARGET}.tmp1 > ${.TARGET}.tmp2 513 @${POSTPROC.${.PREFIX:T}:Ucat} < ${.TARGET}.tmp1 > ${.TARGET}.tmp2
516 @rm ${.TARGET}.tmp1 514 @rm ${.TARGET}.tmp1
517 @echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp2 515 @echo "exit status `cat ${.TARGET:R}.status`" >> ${.TARGET}.tmp2
518 @mv ${.TARGET}.tmp2 ${.TARGET} 516 @mv ${.TARGET}.tmp2 ${.TARGET}
519 517
520# Compare all output files 518# Compare all output files
521test: ${OUTFILES} .PHONY 519test: ${OUTFILES} .PHONY
522 @failed= ; \ 520 @failed= ; \
523 for test in ${TESTS}; do \ 521 for test in ${TESTS}; do \
524 diff -u ${UNIT_TESTS}/$${test}.exp $${test}.out \ 522 diff -u ${UNIT_TESTS}/$${test}.exp $${test}.out \
525 || failed="$${failed}$${failed:+ }$${test}" ; \ 523 || failed="$${failed}$${failed:+ }$${test}" ; \
526 done ; \ 524 done ; \
527 if [ -n "$${failed}" ]; then \ 525 if [ -n "$${failed}" ]; then \
528 echo "Failed tests: $${failed}" ; false ; \ 526 echo "Failed tests: $${failed}" ; false ; \
529 else \ 527 else \
530 echo "All tests passed" ; \ 528 echo "All tests passed" ; \
531 fi 529 fi
532 530
533accept: 531accept:
534 @for test in ${TESTS}; do \ 532 @for test in ${TESTS}; do \
535 cmp -s ${UNIT_TESTS}/$${test}.exp $${test}.out \ 533 cmp -s ${UNIT_TESTS}/$${test}.exp $${test}.out \
536 || { echo "Replacing $${test}.exp" ; \ 534 || { echo "Replacing $${test}.exp" ; \
537 cp $${test}.out ${UNIT_TESTS}/$${test}.exp ; } \ 535 cp $${test}.out ${UNIT_TESTS}/$${test}.exp ; } \
538 done 536 done
539 537
540# Note: only works for adding tests. 538# Note: only works for adding tests.
541# To remove a test, the $$mi file must be edited manually. 539# To remove a test, the $$mi file must be edited manually.
542sync-mi: 540sync-mi:
543 @set -eu; \ 541 @set -eu; \
544 cd "${MAKEFILE:tA:H}/../../.."; \ 542 cd "${MAKEFILE:tA:H}/../../.."; \
545 mi="distrib/sets/lists/tests/mi"; \ 543 mi="distrib/sets/lists/tests/mi"; \
546 cvs update "$$mi"; \ 544 cvs update "$$mi"; \
547 testsdir="usr.bin/make/unit-tests"; \ 545 testsdir="usr.bin/make/unit-tests"; \
548 fmt="./usr/tests/$$testsdir/%s\ttests-usr.bin-tests\tcompattestfile,atf\\n"; \ 546 fmt="./usr/tests/$$testsdir/%s\ttests-usr.bin-tests\tcompattestfile,atf\\n"; \
549 (cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi"; \ 547 (cd "$$testsdir" && ls *.exp *.mk) | xargs printf "$$fmt" >> "$$mi"; \
550 distrib/sets/fmt-list "$$mi"; \ 548 distrib/sets/fmt-list "$$mi"; \
551 cvs diff "$$mi" || true 549 cvs diff "$$mi" || true
552 550
553.if exists(${TEST_MAKE}) 551.if exists(${TEST_MAKE})
554${TESTS:=.rawout}: ${TEST_MAKE} 552${TESTS:=.rawout}: ${TEST_MAKE}
555# in meta mode, we *know* if a target script is impacted 553# in meta mode, we *know* if a target script is impacted
556# by a makefile change. 554# by a makefile change.
557.if ${.MAKE.MODE:Unormal:Mmeta} == "" 555.if ${.MAKE.MODE:Unormal:Mmeta} == ""
558${TESTS:=.rawout}: ${.PARSEDIR}/Makefile 556${TESTS:=.rawout}: ${.PARSEDIR}/Makefile
559.endif 557.endif
560.endif 558.endif
561 559
562.-include <bsd.obj.mk> 560.-include <bsd.obj.mk>

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-match-escape.exp (switch to unified 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 @@ @@ -1,5 +1,29 @@
 1Var_Parse: ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES
 2Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, none)
 3Var_Parse: ${:U}\: with VARE_UNDEFERR|VARE_WANTRES
 4Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF)
 5Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
1Pattern[SPECIALS] for [\: : \\ * \*] is [\:] 6Pattern[SPECIALS] for [\: : \\ * \*] is [\:]
 7ModifyWords: split "\: : \\ * \*" into 5 words
 8VarMatch [\:] [\:]
 9VarMatch [:] [\:]
 10VarMatch [\\] [\:]
 11VarMatch [*] [\:]
 12VarMatch [\*] [\:]
 13Result of ${SPECIALS:M${:U}\:} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, none)
 14Var_Parse: ${SPECIALS:M\:${:U}} with VARE_UNDEFERR|VARE_WANTRES
 15Applying ${SPECIALS:M...} to "\: : \\ * \*" (VARE_UNDEFERR|VARE_WANTRES, none, none)
 16Var_Parse: ${:U} with VARE_UNDEFERR|VARE_WANTRES
 17Applying ${:U} to "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF)
 18Result of ${:U} is "" (VARE_UNDEFERR|VARE_WANTRES, none, VEF_UNDEF|VEF_DEF)
2Pattern[SPECIALS] for [\: : \\ * \*] is [:] 19Pattern[SPECIALS] for [\: : \\ * \*] is [:]
3Pattern[.MAKE.DEPENDFILE] for [.depend] is [/dev/null] 20ModifyWords: split "\: : \\ * \*" into 5 words
4Pattern[.MAKE.DEPENDFILE] for [.depend] is [no*] 21VarMatch [\:] [:]
 22VarMatch [:] [:]
 23VarMatch [\\] [:]
 24VarMatch [*] [:]
 25VarMatch [\*] [:]
 26Result of ${SPECIALS:M\:${:U}} is ":" (VARE_UNDEFERR|VARE_WANTRES, none, none)
 27Global:.MAKEFLAGS = -r -k -d v -d
 28Global:.MAKEFLAGS = -r -k -d v -d 0
5exit status 0 29exit status 0

cvs diff -r1.2 -r1.3 src/usr.bin/make/unit-tests/varmod-match-escape.mk (switch to unified 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,20 +1,20 @@ @@ -1,20 +1,20 @@
1# $NetBSD: varmod-match-escape.mk,v 1.2 2020/10/24 08:46:08 rillig Exp $ 1# $NetBSD: varmod-match-escape.mk,v 1.3 2020/11/01 19:02:22 rillig Exp $
2# 2#
3# As of 2020-08-01, the :M and :N modifiers interpret backslashes differently, 3# As of 2020-08-01, the :M and :N modifiers interpret backslashes differently,
4# depending on whether there was a variable expression somewhere before the 4# depending on whether there was a variable expression somewhere before the
5# first backslash or not. See ApplyModifier_Match, "copy = TRUE". 5# first backslash or not. See ApplyModifier_Match, "copy = TRUE".
6# 6#
7# Apart from the different and possibly confusing debug output, there is no 7# Apart from the different and possibly confusing debug output, there is no
8# difference in behavior. When parsing the modifier text, only \{, \} and \: 8# difference in behavior. When parsing the modifier text, only \{, \} and \:
9# are unescaped, and in the pattern matching these have the same meaning as 9# are unescaped, and in the pattern matching these have the same meaning as
10# their plain variants '{', '}' and ':'. In the pattern matching from 10# their plain variants '{', '}' and ':'. In the pattern matching from
11# Str_Match, only \*, \? or \[ would make a noticeable difference. 11# Str_Match, only \*, \? or \[ would make a noticeable difference.
12SPECIALS= \: : \\ * \* 12SPECIALS= \: : \\ * \*
13RELEVANT= yes 13.MAKEFLAGS: -dv
14.if ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}} 14.if ${SPECIALS:M${:U}\:} != ${SPECIALS:M\:${:U}}
15. warning unexpected 15. warning unexpected
16.endif 16.endif
17RELEVANT= no 17.MAKEFLAGS: -d0
18 18
19all: 19all:
20 @:; 20 @:;