summaryrefslogtreecommitdiff
path: root/tests/scripts/features/escape
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/features/escape')
-rw-r--r--tests/scripts/features/escape12
1 files changed, 11 insertions, 1 deletions
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;