| @@ -1,15 +1,15 @@ | | | @@ -1,15 +1,15 @@ |
1 | #! /bin/sh | | 1 | #! /bin/sh |
2 | # $NetBSD: subst.sh,v 1.41 2020/05/16 12:43:10 rillig Exp $ | | 2 | # $NetBSD: subst.sh,v 1.42 2020/05/16 19:02:32 rillig Exp $ |
3 | # | | 3 | # |
4 | # Tests for mk/subst.mk. | | 4 | # Tests for mk/subst.mk. |
5 | # | | 5 | # |
6 | | | 6 | |
7 | set -eu | | 7 | set -eu |
8 | | | 8 | |
9 | . './test.subr' | | 9 | . './test.subr' |
10 | | | 10 | |
11 | test_case_set_up() { | | 11 | test_case_set_up() { |
12 | wrkdir="$tmpdir/wrkdir" | | 12 | wrkdir="$tmpdir/wrkdir" |
13 | mkdir "$wrkdir" | | 13 | mkdir "$wrkdir" |
14 | | | 14 | |
15 | create_file 'prepare-subst.mk' <<-EOF | | 15 | create_file 'prepare-subst.mk' <<-EOF |
| @@ -131,65 +131,106 @@ if test_case_begin 'several files by pat | | | @@ -131,65 +131,106 @@ if test_case_begin 'several files by pat |
131 | run_bmake 'testcase.mk' 'subst-class' 1> "$tmpdir/output" 2>&1 \ | | 131 | run_bmake 'testcase.mk' 'subst-class' 1> "$tmpdir/output" 2>&1 \ |
132 | && exitcode=0 || exitcode=$? | | 132 | && exitcode=0 || exitcode=$? |
133 | | | 133 | |
134 | assert_that "$tmpdir/output" --file-is-lines \ | | 134 | assert_that "$tmpdir/output" --file-is-lines \ |
135 | '=> Substituting "class" in pattern-*' | | 135 | '=> Substituting "class" in pattern-*' |
136 | assert_that 'pattern-first' --file-is-lines 'the first example' | | 136 | assert_that 'pattern-first' --file-is-lines 'the first example' |
137 | assert_that 'pattern-second' --file-is-lines 'the second example' | | 137 | assert_that 'pattern-second' --file-is-lines 'the second example' |
138 | assert_that 'pattern-third' --file-is-lines 'the third example' | | 138 | assert_that 'pattern-third' --file-is-lines 'the third example' |
139 | | | 139 | |
140 | test_case_end | | 140 | test_case_end |
141 | fi | | 141 | fi |
142 | | | 142 | |
143 | | | 143 | |
144 | if test_case_begin 'pattern with 1 noop'; then | | 144 | if test_case_begin 'pattern with 1 noop, no-op ok'; then |
145 | | | 145 | |
146 | # Several files are given via a pattern. | | 146 | # Several files are given via a pattern. |
147 | # Most of the files are patched, but one stays the same. | | 147 | # Most of the files are patched, but one stays the same. |
148 | # Since it is easier to give a too broad pattern like *.py | | 148 | # Since it is easier to give a too broad pattern like *.py |
149 | # than to exclude a few files from such a pattern, | | 149 | # than to exclude a few files from such a pattern, |
150 | # only an info is logged. | | 150 | # only an info is logged. |
151 | # This is not an error. | | 151 | # This is not an error. |
152 | | | 152 | |
153 | create_file 'testcase.mk' <<-EOF | | 153 | create_file 'testcase.mk' <<-EOF |
154 | SUBST_CLASSES+= class | | 154 | SUBST_CLASSES+= class |
155 | SUBST_STAGE.class= pre-configure | | 155 | SUBST_STAGE.class= pre-configure |
156 | SUBST_FILES.class= pattern-* | | 156 | SUBST_FILES.class= pattern-* |
157 | SUBST_SED.class= -e 's,file,example,' | | 157 | SUBST_SED.class= -e 's,file,example,' |
| | | 158 | SUBST_NOOP_OK.class= yes |
158 | | | 159 | |
159 | .include "prepare-subst.mk" | | 160 | .include "prepare-subst.mk" |
160 | .include "mk/subst.mk" | | 161 | .include "mk/subst.mk" |
161 | | | 162 | |
162 | all: subst-class | | 163 | all: subst-class |
163 | EOF | | 164 | EOF |
164 | | | 165 | |
165 | create_file_lines 'pattern-first' 'the first file' | | 166 | create_file_lines 'pattern-first' 'the first file' |
166 | create_file_lines 'pattern-second' 'the second is already an example' | | 167 | create_file_lines 'pattern-second' 'the second is already an example' |
167 | create_file_lines 'pattern-third' 'the third file' | | 168 | create_file_lines 'pattern-third' 'the third file' |
168 | | | 169 | |
169 | run_bmake 'testcase.mk' 1> "$tmpdir/output" \ | | 170 | run_bmake 'testcase.mk' 1> "$tmpdir/output" 2>&1 \ |
170 | && exitcode=0 || exitcode=$? | | 171 | && exitcode=0 || exitcode=$? |
171 | | | 172 | |
172 | assert_that "$tmpdir/output" --file-is-lines \ | | 173 | assert_that "$tmpdir/output" --file-is-lines \ |
173 | '=> Substituting "class" in pattern-*' \ | | 174 | '=> Substituting "class" in pattern-*' \ |
174 | 'info: [subst.mk:class] Nothing changed in "pattern-second".' | | 175 | 'info: [subst.mk:class] Nothing changed in "pattern-second".' |
175 | assert_that 'pattern-first' --file-is-lines 'the first example' | | 176 | assert_that 'pattern-first' --file-is-lines 'the first example' |
176 | assert_that 'pattern-second' --file-is-lines 'the second is already an example' | | 177 | assert_that 'pattern-second' --file-is-lines 'the second is already an example' |
177 | assert_that 'pattern-third' --file-is-lines 'the third example' | | 178 | assert_that 'pattern-third' --file-is-lines 'the third example' |
178 | | | 179 | |
179 | test_case_end | | 180 | test_case_end |
180 | fi | | 181 | fi |
181 | | | 182 | |
182 | | | 183 | |
| | | 184 | if test_case_begin 'pattern with 1 noop, no-op not ok'; then |
| | | 185 | |
| | | 186 | # Several files are given via a pattern. |
| | | 187 | # Most of the files are patched, but one stays the same. |
| | | 188 | # Since it is easier to give a too broad pattern like *.py |
| | | 189 | # than to exclude a few files from such a pattern, |
| | | 190 | # only a warning is logged. |
| | | 191 | # This is not an error. |
| | | 192 | |
| | | 193 | create_file 'testcase.mk' <<-EOF |
| | | 194 | SUBST_CLASSES+= class |
| | | 195 | SUBST_STAGE.class= pre-configure |
| | | 196 | SUBST_FILES.class= pattern-* |
| | | 197 | SUBST_SED.class= -e 's,file,example,' |
| | | 198 | SUBST_NOOP_OK.class= no |
| | | 199 | |
| | | 200 | .include "prepare-subst.mk" |
| | | 201 | .include "mk/subst.mk" |
| | | 202 | |
| | | 203 | all: subst-class |
| | | 204 | EOF |
| | | 205 | |
| | | 206 | create_file_lines 'pattern-first' 'the first file' |
| | | 207 | create_file_lines 'pattern-second' 'the second is already an example' |
| | | 208 | create_file_lines 'pattern-third' 'the third file' |
| | | 209 | |
| | | 210 | run_bmake 'testcase.mk' 1> "$tmpdir/output" 2>&1 \ |
| | | 211 | && exitcode=0 || exitcode=$? |
| | | 212 | |
| | | 213 | assert_that "$tmpdir/output" --file-is-lines \ |
| | | 214 | '=> Substituting "class" in pattern-*' \ |
| | | 215 | 'warning: [subst.mk:class] Nothing changed in "pattern-second".' |
| | | 216 | assert_that 'pattern-first' --file-is-lines 'the first example' |
| | | 217 | assert_that 'pattern-second' --file-is-lines 'the second is already an example' |
| | | 218 | assert_that 'pattern-third' --file-is-lines 'the third example' |
| | | 219 | |
| | | 220 | test_case_end |
| | | 221 | fi |
| | | 222 | |
| | | 223 | |
183 | if test_case_begin 'single file noop, noop_ok=yes'; then | | 224 | if test_case_begin 'single file noop, noop_ok=yes'; then |
184 | | | 225 | |
185 | create_file 'testcase.mk' <<-EOF | | 226 | create_file 'testcase.mk' <<-EOF |
186 | SUBST_CLASSES+= class | | 227 | SUBST_CLASSES+= class |
187 | SUBST_STAGE.class= pre-configure | | 228 | SUBST_STAGE.class= pre-configure |
188 | SUBST_FILES.class= single | | 229 | SUBST_FILES.class= single |
189 | SUBST_SED.class= -e 's,file,example,' | | 230 | SUBST_SED.class= -e 's,file,example,' |
190 | SUBST_NOOP_OK.class= yes | | 231 | SUBST_NOOP_OK.class= yes |
191 | | | 232 | |
192 | .include "prepare-subst.mk" | | 233 | .include "prepare-subst.mk" |
193 | .include "mk/subst.mk" | | 234 | .include "mk/subst.mk" |
194 | EOF | | 235 | EOF |
195 | | | 236 | |
| @@ -285,95 +326,198 @@ if test_case_begin 'single file nonexist | | | @@ -285,95 +326,198 @@ if test_case_begin 'single file nonexist |
285 | | | 326 | |
286 | run_bmake 'testcase.mk' 'subst-class' 1> "$tmpdir/output" 2>&1 \ | | 327 | run_bmake 'testcase.mk' 'subst-class' 1> "$tmpdir/output" 2>&1 \ |
287 | && exitcode=0 || exitcode=$? | | 328 | && exitcode=0 || exitcode=$? |
288 | | | 329 | |
289 | assert_that "$tmpdir/output" --file-is-lines \ | | 330 | assert_that "$tmpdir/output" --file-is-lines \ |
290 | '=> Substituting "class" in nonexistent' \ | | 331 | '=> Substituting "class" in nonexistent' \ |
291 | 'info: [subst.mk:class] Ignoring nonexistent file "nonexistent".' | | 332 | 'info: [subst.mk:class] Ignoring nonexistent file "nonexistent".' |
292 | assert_that "$exitcode" --equals '0' | | 333 | assert_that "$exitcode" --equals '0' |
293 | | | 334 | |
294 | test_case_end | | 335 | test_case_end |
295 | fi | | 336 | fi |
296 | | | 337 | |
297 | | | 338 | |
298 | if test_case_begin 'several patterns, 1 nonexistent'; then | | 339 | if test_case_begin 'several filename patterns, 1 nonexistent, no-op ok'; then |
299 | | | 340 | |
300 | create_file 'testcase.mk' <<-EOF | | 341 | create_file 'testcase.mk' <<-EOF |
301 | SUBST_CLASSES+= class | | 342 | SUBST_CLASSES+= class |
302 | SUBST_STAGE.class= pre-configure | | 343 | SUBST_STAGE.class= pre-configure |
303 | SUBST_FILES.class= *exist* *not-found* | | 344 | SUBST_FILES.class= *exist* *not-found* |
304 | SUBST_SED.class= -e 's,file,example,' | | 345 | SUBST_SED.class= -e 's,file,example,' |
| | | 346 | SUBST_NOOP_OK.class= yes |
305 | | | 347 | |
306 | .include "prepare-subst.mk" | | 348 | .include "prepare-subst.mk" |
307 | .include "mk/subst.mk" | | 349 | .include "mk/subst.mk" |
308 | EOF | | 350 | EOF |
309 | | | 351 | |
310 | create_file_lines 'exists' 'this file exists' | | 352 | create_file_lines 'exists' 'this file exists' |
311 | | | 353 | |
312 | run_bmake 'testcase.mk' 'subst-class' 1> "$tmpdir/output" 2>&1 \ | | 354 | run_bmake 'testcase.mk' 'subst-class' 1> "$tmpdir/output" 2>&1 \ |
313 | && exitcode=0 || exitcode=$? | | 355 | && exitcode=0 || exitcode=$? |
314 | | | 356 | |
315 | assert_that "$tmpdir/output" --file-is-lines \ | | 357 | assert_that "$tmpdir/output" --file-is-lines \ |
316 | '=> Substituting "class" in *exist* *not-found*' \ | | 358 | '=> Substituting "class" in *exist* *not-found*' \ |
317 | 'info: [subst.mk:class] Ignoring nonexistent file "./*not-found*".' | | 359 | 'info: [subst.mk:class] Ignoring nonexistent file "./*not-found*".' |
318 | assert_that 'exists' --file-is-lines 'this example exists' | | 360 | assert_that 'exists' --file-is-lines 'this example exists' |
319 | assert_that "$exitcode" --equals '0' | | 361 | assert_that "$exitcode" --equals '0' |
320 | | | 362 | |
321 | test_case_end | | 363 | test_case_end |
322 | fi | | 364 | fi |
323 | | | 365 | |
324 | | | 366 | |
325 | if test_case_begin 'multiple missing files, all are reported at once'; then | | 367 | if test_case_begin 'several filename patterns, 1 nonexistent, no-op not ok'; then |
| | | 368 | |
| | | 369 | create_file 'testcase.mk' <<-EOF |
| | | 370 | SUBST_CLASSES+= class |
| | | 371 | SUBST_STAGE.class= pre-configure |
| | | 372 | SUBST_FILES.class= *exist* *not-found* |
| | | 373 | SUBST_SED.class= -e 's,file,example,' |
| | | 374 | SUBST_NOOP_OK.class= no |
| | | 375 | |
| | | 376 | .include "prepare-subst.mk" |
| | | 377 | .include "mk/subst.mk" |
| | | 378 | EOF |
| | | 379 | |
| | | 380 | create_file_lines 'exists' 'this file exists' |
| | | 381 | |
| | | 382 | run_bmake 'testcase.mk' 'subst-class' 1> "$tmpdir/output" 2>&1 \ |
| | | 383 | && exitcode=0 || exitcode=$? |
| | | 384 | |
| | | 385 | assert_that "$tmpdir/output" --file-is-lines \ |
| | | 386 | '=> Substituting "class" in *exist* *not-found*' \ |
| | | 387 | 'warning: [subst.mk:class] Ignoring nonexistent file "./*not-found*".' \ |
| | | 388 | 'fail: [subst.mk:class] The filename pattern "*not-found*" has no effect.' \ |
| | | 389 | '*** Error code 1' \ |
| | | 390 | '' \ |
| | | 391 | 'Stop.' \ |
| | | 392 | "$make: stopped in $PWD" |
| | | 393 | assert_that 'exists' --file-is-lines 'this example exists' |
| | | 394 | assert_that "$exitcode" --equals '1' |
| | | 395 | |
| | | 396 | test_case_end |
| | | 397 | fi |
| | | 398 | |
| | | 399 | |
| | | 400 | if test_case_begin 'multiple missing files, all are reported at once, no-op not ok'; then |
| | | 401 | |
| | | 402 | create_file 'testcase.mk' <<-EOF |
| | | 403 | SUBST_CLASSES+= class |
| | | 404 | SUBST_STAGE.class= pre-configure |
| | | 405 | SUBST_FILES.class= does not exist |
| | | 406 | SUBST_SED.class= -e 'sahara' |
| | | 407 | SUBST_NOOP_OK.class= no |
| | | 408 | |
| | | 409 | .include "prepare-subst.mk" |
| | | 410 | .include "mk/subst.mk" |
| | | 411 | EOF |
| | | 412 | |
| | | 413 | run_bmake 'testcase.mk' 1> "$tmpdir/output" 2>&1 \ |
| | | 414 | && exitcode=0 || exitcode=$? |
| | | 415 | |
| | | 416 | assert_that "$tmpdir/output" --file-is-lines \ |
| | | 417 | '=> Substituting "class" in does not exist' \ |
| | | 418 | 'warning: [subst.mk:class] Ignoring nonexistent file "does".' \ |
| | | 419 | 'warning: [subst.mk:class] Ignoring nonexistent file "not".' \ |
| | | 420 | 'warning: [subst.mk:class] Ignoring nonexistent file "exist".' \ |
| | | 421 | 'fail: [subst.mk:class] The filename patterns "does not exist" have no effect.' \ |
| | | 422 | '*** Error code 1' \ |
| | | 423 | '' \ |
| | | 424 | 'Stop.' \ |
| | | 425 | "$make: stopped in $PWD" |
| | | 426 | assert_that "$exitcode" --equals '1' |
| | | 427 | |
| | | 428 | test_case_end |
| | | 429 | fi |
| | | 430 | |
| | | 431 | |
| | | 432 | if test_case_begin 'multiple missing files, all are reported at once, no-op ok'; then |
326 | | | 433 | |
327 | create_file 'testcase.mk' <<-EOF | | 434 | create_file 'testcase.mk' <<-EOF |
328 | SUBST_CLASSES+= class | | 435 | SUBST_CLASSES+= class |
329 | SUBST_STAGE.class= pre-configure | | 436 | SUBST_STAGE.class= pre-configure |
330 | SUBST_FILES.class= does not exist | | 437 | SUBST_FILES.class= does not exist |
331 | SUBST_SED.class= -e 'sahara' | | 438 | SUBST_SED.class= -e 'sahara' |
| | | 439 | SUBST_NOOP_OK.class= yes |
332 | | | 440 | |
333 | .include "prepare-subst.mk" | | 441 | .include "prepare-subst.mk" |
334 | .include "mk/subst.mk" | | 442 | .include "mk/subst.mk" |
335 | EOF | | 443 | EOF |
336 | | | 444 | |
337 | run_bmake 'testcase.mk' > "$tmpdir/output" \ | | 445 | run_bmake 'testcase.mk' 1> "$tmpdir/output" 2>&1 \ |
338 | && exitcode=0 || exitcode=$? | | 446 | && exitcode=0 || exitcode=$? |
339 | | | 447 | |
340 | assert_that "$tmpdir/output" --file-is-lines \ | | 448 | assert_that "$tmpdir/output" --file-is-lines \ |
341 | '=> Substituting "class" in does not exist' \ | | 449 | '=> Substituting "class" in does not exist' \ |
342 | 'info: [subst.mk:class] Ignoring nonexistent file "does".' \ | | 450 | 'info: [subst.mk:class] Ignoring nonexistent file "does".' \ |
343 | 'info: [subst.mk:class] Ignoring nonexistent file "not".' \ | | 451 | 'info: [subst.mk:class] Ignoring nonexistent file "not".' \ |
344 | 'info: [subst.mk:class] Ignoring nonexistent file "exist".' | | 452 | 'info: [subst.mk:class] Ignoring nonexistent file "exist".' |
345 | assert_that "$exitcode" --equals '0' | | 453 | assert_that "$exitcode" --equals '0' |
346 | | | 454 | |
347 | test_case_end | | 455 | test_case_end |
348 | fi | | 456 | fi |
349 | | | 457 | |
350 | | | 458 | |
351 | if test_case_begin 'multiple no-op files, all are reported at once'; then | | 459 | if test_case_begin 'multiple no-op files, all are reported at once, no-op not ok'; then |
352 | | | 460 | |
353 | create_file 'testcase.mk' <<-EOF | | 461 | create_file 'testcase.mk' <<-EOF |
354 | SUBST_CLASSES+= class | | 462 | SUBST_CLASSES+= class |
355 | SUBST_STAGE.class= pre-configure | | 463 | SUBST_STAGE.class= pre-configure |
356 | SUBST_FILES.class= first second third | | 464 | SUBST_FILES.class= first second third |
357 | SUBST_SED.class= -e 's,from,to,' | | 465 | SUBST_SED.class= -e 's,from,to,' |
| | | 466 | SUBST_NOOP_OK.class= no |
| | | 467 | |
| | | 468 | .include "prepare-subst.mk" |
| | | 469 | .include "mk/subst.mk" |
| | | 470 | EOF |
| | | 471 | create_file_lines 'first' 'text' |
| | | 472 | create_file_lines 'second' 'second' |
| | | 473 | create_file_lines 'third' 'third' |
| | | 474 | |
| | | 475 | run_bmake 'testcase.mk' 1> "$tmpdir/output" 2>&1 \ |
| | | 476 | && exitcode=0 || exitcode=$? |
| | | 477 | |
| | | 478 | assert_that "$tmpdir/output" --file-is-lines \ |
| | | 479 | '=> Substituting "class" in first second third' \ |
| | | 480 | 'warning: [subst.mk:class] Nothing changed in "first".' \ |
| | | 481 | 'warning: [subst.mk:class] Nothing changed in "second".' \ |
| | | 482 | 'warning: [subst.mk:class] Nothing changed in "third".' \ |
| | | 483 | 'fail: [subst.mk:class] The filename patterns "first second third" have no effect.' \ |
| | | 484 | '*** Error code 1' \ |
| | | 485 | '' \ |
| | | 486 | 'Stop.' \ |
| | | 487 | "$make: stopped in $PWD" |
| | | 488 | assert_that "$exitcode" --equals '1' |
| | | 489 | |
| | | 490 | test_case_end |
| | | 491 | fi |
| | | 492 | |
| | | 493 | |
| | | 494 | if test_case_begin 'multiple no-op files, all are reported at once, no-op ok'; then |
| | | 495 | |
| | | 496 | create_file 'testcase.mk' <<-EOF |
| | | 497 | SUBST_CLASSES+= class |
| | | 498 | SUBST_STAGE.class= pre-configure |
| | | 499 | SUBST_FILES.class= first second third |
| | | 500 | SUBST_SED.class= -e 's,from,to,' |
| | | 501 | SUBST_NOOP_OK.class= yes |
358 | | | 502 | |
359 | .include "prepare-subst.mk" | | 503 | .include "prepare-subst.mk" |
360 | .include "mk/subst.mk" | | 504 | .include "mk/subst.mk" |
361 | EOF | | 505 | EOF |
362 | create_file_lines 'first' 'text' | | 506 | create_file_lines 'first' 'text' |
363 | create_file_lines 'second' 'second' | | 507 | create_file_lines 'second' 'second' |
364 | create_file_lines 'third' 'third' | | 508 | create_file_lines 'third' 'third' |
365 | | | 509 | |
366 | run_bmake 'testcase.mk' > "$tmpdir/output" \ | | 510 | run_bmake 'testcase.mk' 1> "$tmpdir/output" 2>&1 \ |
367 | && exitcode=0 || exitcode=$? | | 511 | && exitcode=0 || exitcode=$? |
368 | | | 512 | |
369 | assert_that "$tmpdir/output" --file-is-lines \ | | 513 | assert_that "$tmpdir/output" --file-is-lines \ |
370 | '=> Substituting "class" in first second third' \ | | 514 | '=> Substituting "class" in first second third' \ |
371 | 'info: [subst.mk:class] Nothing changed in "first".' \ | | 515 | 'info: [subst.mk:class] Nothing changed in "first".' \ |
372 | 'info: [subst.mk:class] Nothing changed in "second".' \ | | 516 | 'info: [subst.mk:class] Nothing changed in "second".' \ |
373 | 'info: [subst.mk:class] Nothing changed in "third".' | | 517 | 'info: [subst.mk:class] Nothing changed in "third".' |
374 | assert_that "$exitcode" --equals '0' | | 518 | assert_that "$exitcode" --equals '0' |
375 | | | 519 | |
376 | test_case_end | | 520 | test_case_end |
377 | fi | | 521 | fi |
378 | | | 522 | |
379 | | | 523 | |
| @@ -1431,26 +1575,27 @@ if test_case_begin 'no-op SUBST_FILTER_C | | | @@ -1431,26 +1575,27 @@ if test_case_begin 'no-op SUBST_FILTER_C |
1431 | assert_that 'file' --file-is-lines \ | | 1575 | assert_that 'file' --file-is-lines \ |
1432 | 'only letters' | | 1576 | 'only letters' |
1433 | | | 1577 | |
1434 | test_case_end | | 1578 | test_case_end |
1435 | fi | | 1579 | fi |
1436 | | | 1580 | |
1437 | | | 1581 | |
1438 | if test_case_begin 'backtick in SUBST_SED'; then | | 1582 | if test_case_begin 'backtick in SUBST_SED'; then |
1439 | | | 1583 | |
1440 | create_file_lines 'testcase.mk' \ | | 1584 | create_file_lines 'testcase.mk' \ |
1441 | 'SUBST_CLASSES+= id' \ | | 1585 | 'SUBST_CLASSES+= id' \ |
1442 | 'SUBST_FILES.id= file' \ | | 1586 | 'SUBST_FILES.id= file' \ |
1443 | "SUBST_SED.id= -e 's,\"\\\\\`,\"\\\\\`,'" \ | | 1587 | "SUBST_SED.id= -e 's,\"\\\\\`,\"\\\\\`,'" \ |
| | | 1588 | 'SUBST_NOOP_OK.id= yes' \ |
1444 | '' \ | | 1589 | '' \ |
1445 | '.include "prepare-subst.mk"' \ | | 1590 | '.include "prepare-subst.mk"' \ |
1446 | '.include "mk/subst.mk"' | | 1591 | '.include "mk/subst.mk"' |
1447 | create_file_lines 'file' \ | | 1592 | create_file_lines 'file' \ |
1448 | 'from`' | | 1593 | 'from`' |
1449 | | | 1594 | |
1450 | run_bmake 'testcase.mk' 'subst-id' 1> "$tmpdir/output" 2>&1 \ | | 1595 | run_bmake 'testcase.mk' 'subst-id' 1> "$tmpdir/output" 2>&1 \ |
1451 | && exitcode=0 || exitcode=$? | | 1596 | && exitcode=0 || exitcode=$? |
1452 | | | 1597 | |
1453 | assert_that "$tmpdir/output" --file-is-lines \ | | 1598 | assert_that "$tmpdir/output" --file-is-lines \ |
1454 | '=> Substituting "id" in file' \ | | 1599 | '=> Substituting "id" in file' \ |
1455 | 'info: [subst.mk:id] Nothing changed in "file".' | | 1600 | 'info: [subst.mk:id] Nothing changed in "file".' |
1456 | | | 1601 | |