diff options
Diffstat (limited to 'tests/scripts/options/dash-B')
-rw-r--r-- | tests/scripts/options/dash-B | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/tests/scripts/options/dash-B b/tests/scripts/options/dash-B index 32992b3..4ac377f 100644 --- a/tests/scripts/options/dash-B +++ b/tests/scripts/options/dash-B @@ -8,9 +8,9 @@ Invoke make once, so it builds everything. Invoke it again and verify that nothing is built. Then invoke it with -B and verify that everything is built again."; -open(MAKEFILE,"> $makefile"); +&touch('bar.x'); -print MAKEFILE <<'EOF'; +run_make_test(' .SUFFIXES: .PHONY: all @@ -19,25 +19,21 @@ all: foo foo: bar.x @echo cp $< $@ @echo "" > $@ -EOF - -close(MAKEFILE); +', + '', 'cp bar.x foo'); +run_make_test(undef, '', "#MAKE#: Nothing to be done for `all'."); +run_make_test(undef, '-B', 'cp bar.x foo'); -&touch('bar.x'); +# Put the timestamp for foo into the future; it should still be remade. -&run_make_with_options($makefile, '', &get_logfile); -$answer = "cp bar.x foo\n"; -&compare_output($answer, &get_logfile(1)); +utouch(1000, 'foo'); +run_make_test(undef, '', "#MAKE#: Nothing to be done for `all'."); +run_make_test(undef, '-B', 'cp bar.x foo'); -&run_make_with_options($makefile, '', &get_logfile); -$answer = "$make_name: Nothing to be done for `all'.\n"; -&compare_output($answer, &get_logfile(1)); -&run_make_with_options($makefile, '-B', &get_logfile); -$answer = "cp bar.x foo\n"; -&compare_output($answer, &get_logfile(1)); +# Clean up -unlink('bar.x', 'foo') unless $keep; +rmfiles('bar.x', 'foo'); 1; |