summaryrefslogtreecommitdiff
path: root/tests/scripts/options
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2005-02-28 09:41:25 +0000
committerPaul Smith <psmith@gnu.org>2005-02-28 09:41:25 +0000
commita2232470c27151ba0c1c37f3eba1e35396d7eabf (patch)
tree114e7f14497e728849bf30374145ec9383212905 /tests/scripts/options
parentd2516343bc5c105543b22eed3b073a8a4e14a659 (diff)
downloadgunmake-a2232470c27151ba0c1c37f3eba1e35396d7eabf.tar.gz
- Fix bug #7144 (infinite loop sometimes with -q and double-colon rules)
- Resolve support request #103195 (rationalize wordlist fn arguments)
Diffstat (limited to 'tests/scripts/options')
-rw-r--r--tests/scripts/options/dash-B28
-rw-r--r--tests/scripts/options/dash-q49
2 files changed, 30 insertions, 47 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;
diff --git a/tests/scripts/options/dash-q b/tests/scripts/options/dash-q
index 923e4c4..56f04a1 100644
--- a/tests/scripts/options/dash-q
+++ b/tests/scripts/options/dash-q
@@ -3,11 +3,9 @@ $description = "Test the -q option.\n";
$details = "Try various uses of -q and ensure they all give the correct results.\n";
-open(MAKEFILE, "> $makefile");
-
-# The Contents of the MAKEFILE ...
+# TEST 0
-print MAKEFILE <<'EOMAKE';
+run_make_test('
one:
two: ;
three: ; :
@@ -21,50 +19,39 @@ seven: ; \
$(.XY)
: foo
$(.XY)
-EOMAKE
-
-close(MAKEFILE);
-
-# TEST 0
-
-&run_make_with_options($makefile, "-q one", &get_logfile);
-$answer = "";
-&compare_output($answer, &get_logfile(1));
+',
+ '-q one', '');
# TEST 1
-&run_make_with_options($makefile, "-q two", &get_logfile);
-$answer = "";
-&compare_output($answer, &get_logfile(1));
+run_make_test(undef, '-q two', '');
# TEST 2
-&run_make_with_options($makefile, "-q three", &get_logfile, 256);
-$answer = "";
-&compare_output($answer, &get_logfile(1));
+run_make_test(undef, '-q three', '', 256);
# TEST 3
-&run_make_with_options($makefile, "-q four", &get_logfile);
-$answer = "";
-&compare_output($answer, &get_logfile(1));
+run_make_test(undef, '-q four', '');
# TEST 4
-&run_make_with_options($makefile, "-q five", &get_logfile);
-$answer = "";
-&compare_output($answer, &get_logfile(1));
+run_make_test(undef, '-q five', '');
# TEST 5
-&run_make_with_options($makefile, "-q six", &get_logfile);
-$answer = "";
-&compare_output($answer, &get_logfile(1));
+run_make_test(undef, '-q six', '');
# TEST 6
-&run_make_with_options($makefile, "-q seven", &get_logfile, 256);
-$answer = "";
-&compare_output($answer, &get_logfile(1));
+run_make_test(undef, '-q seven', '', 256);
+
+# TEST 7 : Savannah bug # 7144
+
+run_make_test('
+one:: ; @echo one
+one:: ; @echo two
+',
+ '-q', '', 256);
1;