3 |
|
|
4 |
$details = "Try various uses of -q and ensure they all give the correct results.\n"; |
$details = "Try various uses of -q and ensure they all give the correct results.\n"; |
5 |
|
|
6 |
open(MAKEFILE, "> $makefile"); |
# TEST 0 |
|
|
|
|
# The Contents of the MAKEFILE ... |
|
7 |
|
|
8 |
print MAKEFILE <<'EOMAKE'; |
run_make_test(' |
9 |
one: |
one: |
10 |
two: ; |
two: ; |
11 |
three: ; : |
three: ; : |
19 |
$(.XY) |
$(.XY) |
20 |
: foo |
: foo |
21 |
$(.XY) |
$(.XY) |
22 |
EOMAKE |
', |
23 |
|
'-q one', ''); |
|
close(MAKEFILE); |
|
|
|
|
|
# TEST 0 |
|
|
|
|
|
&run_make_with_options($makefile, "-q one", &get_logfile); |
|
|
$answer = ""; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
24 |
|
|
25 |
# TEST 1 |
# TEST 1 |
26 |
|
|
27 |
&run_make_with_options($makefile, "-q two", &get_logfile); |
run_make_test(undef, '-q two', ''); |
|
$answer = ""; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
28 |
|
|
29 |
# TEST 2 |
# TEST 2 |
30 |
|
|
31 |
&run_make_with_options($makefile, "-q three", &get_logfile, 256); |
run_make_test(undef, '-q three', '', 256); |
|
$answer = ""; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
32 |
|
|
33 |
# TEST 3 |
# TEST 3 |
34 |
|
|
35 |
&run_make_with_options($makefile, "-q four", &get_logfile); |
run_make_test(undef, '-q four', ''); |
|
$answer = ""; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
36 |
|
|
37 |
# TEST 4 |
# TEST 4 |
38 |
|
|
39 |
&run_make_with_options($makefile, "-q five", &get_logfile); |
run_make_test(undef, '-q five', ''); |
|
$answer = ""; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
40 |
|
|
41 |
# TEST 5 |
# TEST 5 |
42 |
|
|
43 |
&run_make_with_options($makefile, "-q six", &get_logfile); |
run_make_test(undef, '-q six', ''); |
|
$answer = ""; |
|
|
&compare_output($answer, &get_logfile(1)); |
|
44 |
|
|
45 |
# TEST 6 |
# TEST 6 |
46 |
|
|
47 |
&run_make_with_options($makefile, "-q seven", &get_logfile, 256); |
run_make_test(undef, '-q seven', '', 256); |
48 |
$answer = ""; |
|
49 |
&compare_output($answer, &get_logfile(1)); |
# TEST 7 : Savannah bug # 7144 |
50 |
|
|
51 |
|
run_make_test(' |
52 |
|
one:: ; @echo one |
53 |
|
one:: ; @echo two |
54 |
|
', |
55 |
|
'-q', '', 256); |
56 |
|
|
57 |
1; |
1; |