summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2005-03-03 17:39:48 +0000
committerBoris Kolpackov <boris@kolpackov.net>2005-03-03 17:39:48 +0000
commitcb2f20026908d5c6e48e2cd3e3e65b5f67498d02 (patch)
tree82f2bd2fa0de34d8cbd8abf62a7827b0879dd5b6 /tests
parent0759af440a1d721f0248b2ea83fe0ad8a1c19cfb (diff)
downloadgunmake-cb2f20026908d5c6e48e2cd3e3e65b5f67498d02.tar.gz
Fixed stem termination and stem triple-expansion bugs.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog14
-rw-r--r--tests/scripts/features/se_implicit36
-rw-r--r--tests/scripts/features/se_statpat18
-rw-r--r--tests/scripts/features/statipattrules6
4 files changed, 70 insertions, 4 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 2c58900..a371f89 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,6 +1,18 @@
+Thu Mar 3 18:34:06 2005 Boris Kolpackov <boris@kolpackov.net>
+
+ * scripts/features/se_implicit: Add a test for stem
+ termination bug. Add a test for stem triple-expansion bug.
+
+ * scripts/features/se_statpat: Add a test for stem
+ triple-expansion bug.
+
+ * scripts/features/statipattrules: Change test #4 to reflect
+ new way empty prerequisite list is handled.
+
+
Tue Mar 1 10:15:25 2005 Boris Kolpackov <boris@kolpackov.net>
- * tests/scripts/features/statipattrules: Add a test for
+ * scripts/features/statipattrules: Add a test for
Savannah bug #12180.
2005-02-28 Paul D. Smith <psmith@gnu.org>
diff --git a/tests/scripts/features/se_implicit b/tests/scripts/features/se_implicit
index b6b726c..0c38c17 100644
--- a/tests/scripts/features/se_implicit
+++ b/tests/scripts/features/se_implicit
@@ -183,6 +183,42 @@ foo.c: ; @echo $@
foo.o: {foo.c} foo.c
');
+# Test #7: Test stem from the middle of the name.
+#
+run_make_test('
+foobarbaz:
+
+foo%baz: % $$*.1
+ @echo $*
+
+bar bar.1:
+ @echo $@
+
+',
+'',
+'bar
+bar.1
+bar
+');
+
+# Test #8: Make sure stem triple-expansion does not happen.
+#
+run_make_test('
+foo$$bar:
+
+f%r: % $$*.1
+ @echo \'$*\'
+
+oo$$ba oo$$ba.1:
+ @echo \'$@\'
+
+',
+'',
+'oo$ba
+oo$ba.1
+oo$ba
+');
+
# This tells the test driver that the perl test script executed properly.
1;
diff --git a/tests/scripts/features/se_statpat b/tests/scripts/features/se_statpat
index 9f1b4a3..3c54622 100644
--- a/tests/scripts/features/se_statpat
+++ b/tests/scripts/features/se_statpat
@@ -102,5 +102,23 @@ baz.a.1
baz.a.2
');
+
+# Test #4: Make sure stem triple-expansion does not happen.
+#
+run_make_test('
+foo$$bar: f%r: % $$*.1
+ @echo \'$*\'
+
+oo$$ba oo$$ba.1:
+ @echo \'$@\'
+
+',
+'',
+'oo$ba
+oo$ba.1
+oo$ba
+');
+
+
# This tells the test driver that the perl test script executed properly.
1;
diff --git a/tests/scripts/features/statipattrules b/tests/scripts/features/statipattrules
index 7d35ec3..b5459b9 100644
--- a/tests/scripts/features/statipattrules
+++ b/tests/scripts/features/statipattrules
@@ -55,11 +55,11 @@ unlink('foo.el', 'bar.c', 'lose.c');
$makefile2 = &get_tmpfile;
open(MAKEFILE, "> $makefile2");
-print MAKEFILE "foo: foo%: % ; \@echo $@\n";
+print MAKEFILE "foo: foo%: % ; \@echo \$@\n";
close(MAKEFILE);
-&run_make_with_options($makefile2, '', &get_logfile, 512);
-$answer = "$makefile2:1: *** target `foo' leaves prerequisite pattern empty. Stop.\n";
+&run_make_with_options($makefile2, '', &get_logfile);
+$answer = "foo\n";
&compare_output($answer, &get_logfile(1));
# TEST #5 -- bug #12180: core dump on a stat pattern rule with an empty