summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2002-09-23 22:16:40 +0000
committerPaul Smith <psmith@gnu.org>2002-09-23 22:16:40 +0000
commitae003efd6114af0c9a8750034182b883183500a7 (patch)
tree140284a79872e800ce2e6468d9b517f1ac2209fe /tests
parentebd05dbeb31dbc09c496d76e802d9b68bd848e9a (diff)
downloadgunmake-ae003efd6114af0c9a8750034182b883183500a7.tar.gz
Fix a bug handling target/prerequisite names containing comment
characters.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/scripts/features/double_colon4
-rw-r--r--tests/scripts/features/escape12
3 files changed, 18 insertions, 3 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 9b5c792..6f42eae 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2002-09-23 Paul D. Smith <psmith@gnu.org>
+
+ * scripts/features/escape: Test handling of escaped comment
+ characters in targets and prerequisites.
+
2002-09-18 Paul D. Smith <psmith@gnu.org>
* scripts/features/export: Test export/unexport of multiple
diff --git a/tests/scripts/features/double_colon b/tests/scripts/features/double_colon
index 3e140c7..082b815 100644
--- a/tests/scripts/features/double_colon
+++ b/tests/scripts/features/double_colon
@@ -73,7 +73,7 @@ if ($parallel_jobs) {
# TEST 4: Each double-colon rule is supposed to be run individually
-&touch('f2.h');
+&utouch(-5, 'f2.h');
&touch('foo');
&run_make_with_options($makefile, "foo", &get_logfile, 0);
@@ -90,7 +90,7 @@ if ($parallel_jobs) {
# TEST 6: Each double-colon rule is supposed to be run individually
-&touch('f1.h');
+&utouch(-5, 'f1.h');
unlink('f2.h');
&touch('foo');
diff --git a/tests/scripts/features/escape b/tests/scripts/features/escape
index b1eed16..88b372a 100644
--- a/tests/scripts/features/escape
+++ b/tests/scripts/features/escape
@@ -3,7 +3,8 @@ $description = "Test various types of escaping in makefiles.";
$details = "\
Make sure that escaping of `:' works in target names.
-Also make sure escaping of whitespace works in target names";
+Make sure escaping of whitespace works in target names.
+Make sure that escaping of '#' works.";
open(MAKEFILE,"> $makefile");
@@ -11,6 +12,9 @@ print MAKEFILE <<'EOF';
$(path)foo : ; @echo cp $^ $@
foo\ bar: ; @echo 'touch "$@"'
+
+sharp: foo\#bar.ext
+foo\#bar.ext: ; @echo foo\#bar.ext = '$@'
EOF
close(MAKEFILE);
@@ -46,5 +50,11 @@ $answer = "$makefile:1: *** target pattern contains no `%'. Stop.\n";
$answer = "touch \"foo bar\"\n";
&compare_output($answer,&get_logfile(1));
+# TEST 6: Test escaped comments
+
+&run_make_with_options($makefile, "sharp", &get_logfile, 0);
+$answer = "foo#bar.ext = foo#bar.ext\n";
+&compare_output($answer,&get_logfile(1));
+
# This tells the test driver that the perl test script executed properly.
1;