summaryrefslogtreecommitdiff
path: root/tests/scripts/options/dash-n
blob: c1f4aab8ea21ddc5784832f592644dc5d3134485 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#                                                                    -*-perl-*-
$description = "Test the -n option.\n";

$details = "Try various uses of -n and ensure they all give the correct results.\n";

open(MAKEFILE, "> $makefile");

# The Contents of the MAKEFILE ...

print MAKEFILE <<'EOMAKE';

final: intermediate ; echo >> $@
intermediate: orig ; echo >> $@

EOMAKE

close(MAKEFILE);

&touch('orig');

&run_make_with_options($makefile, "", &get_logfile);
$answer = "echo >> intermediate\necho >> final\n";
&compare_output($answer, &get_logfile(1));

&run_make_with_options($makefile, "-Worig -n", &get_logfile);
$answer = "echo >> intermediate\necho >> final\n";
&compare_output($answer, &get_logfile(1));

unlink('orig', 'intermediate', 'final');

1;