| 1 | # -*-perl-*-
|
|---|
| 2 | $description = "Test the -q option.\n";
|
|---|
| 3 |
|
|---|
| 4 | $details = "Try various uses of -q and ensure they all give the correct results.\n";
|
|---|
| 5 |
|
|---|
| 6 | open(MAKEFILE, "> $makefile");
|
|---|
| 7 |
|
|---|
| 8 | # The Contents of the MAKEFILE ...
|
|---|
| 9 |
|
|---|
| 10 | print MAKEFILE <<'EOMAKE';
|
|---|
| 11 | one:
|
|---|
| 12 | two: ;
|
|---|
| 13 | three: ; :
|
|---|
| 14 | four: ; $(.XY)
|
|---|
| 15 | five: ; \
|
|---|
| 16 | $(.XY)
|
|---|
| 17 | six: ; \
|
|---|
| 18 | $(.XY)
|
|---|
| 19 | $(.XY)
|
|---|
| 20 | seven: ; \
|
|---|
| 21 | $(.XY)
|
|---|
| 22 | : foo
|
|---|
| 23 | $(.XY)
|
|---|
| 24 | EOMAKE
|
|---|
| 25 |
|
|---|
| 26 | close(MAKEFILE);
|
|---|
| 27 |
|
|---|
| 28 | # TEST 0
|
|---|
| 29 |
|
|---|
| 30 | &run_make_with_options($makefile, "-q one", &get_logfile);
|
|---|
| 31 | $answer = "";
|
|---|
| 32 | &compare_output($answer, &get_logfile(1));
|
|---|
| 33 |
|
|---|
| 34 | # TEST 1
|
|---|
| 35 |
|
|---|
| 36 | &run_make_with_options($makefile, "-q two", &get_logfile);
|
|---|
| 37 | $answer = "";
|
|---|
| 38 | &compare_output($answer, &get_logfile(1));
|
|---|
| 39 |
|
|---|
| 40 | # TEST 2
|
|---|
| 41 |
|
|---|
| 42 | &run_make_with_options($makefile, "-q three", &get_logfile, 256);
|
|---|
| 43 | $answer = "";
|
|---|
| 44 | &compare_output($answer, &get_logfile(1));
|
|---|
| 45 |
|
|---|
| 46 | # TEST 3
|
|---|
| 47 |
|
|---|
| 48 | &run_make_with_options($makefile, "-q four", &get_logfile);
|
|---|
| 49 | $answer = "";
|
|---|
| 50 | &compare_output($answer, &get_logfile(1));
|
|---|
| 51 |
|
|---|
| 52 | # TEST 4
|
|---|
| 53 |
|
|---|
| 54 | &run_make_with_options($makefile, "-q five", &get_logfile);
|
|---|
| 55 | $answer = "";
|
|---|
| 56 | &compare_output($answer, &get_logfile(1));
|
|---|
| 57 |
|
|---|
| 58 | # TEST 5
|
|---|
| 59 |
|
|---|
| 60 | &run_make_with_options($makefile, "-q six", &get_logfile);
|
|---|
| 61 | $answer = "";
|
|---|
| 62 | &compare_output($answer, &get_logfile(1));
|
|---|
| 63 |
|
|---|
| 64 | # TEST 6
|
|---|
| 65 |
|
|---|
| 66 | &run_make_with_options($makefile, "-q seven", &get_logfile, 256);
|
|---|
| 67 | $answer = "";
|
|---|
| 68 | &compare_output($answer, &get_logfile(1));
|
|---|
| 69 |
|
|---|
| 70 | 1;
|
|---|