summaryrefslogtreecommitdiff
path: root/tests/scripts/features
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2012-09-09 22:37:13 +0000
committerPaul Smith <psmith@gnu.org>2012-09-09 22:37:13 +0000
commit7d3743dfdc0de4d5867325ca8295034773ad26cf (patch)
tree10df9f71a7f077d44e91b10b241ce3f1b52cd3ae /tests/scripts/features
parenta839588fc940a359603dcca47adde5c97fb39aa9 (diff)
downloadgunmake-7d3743dfdc0de4d5867325ca8295034773ad26cf.tar.gz
Verify that backslashes before non-special characters are preserved.
Diffstat (limited to 'tests/scripts/features')
-rw-r--r--tests/scripts/features/escape11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/scripts/features/escape b/tests/scripts/features/escape
index 0d4427e..9b2adb5 100644
--- a/tests/scripts/features/escape
+++ b/tests/scripts/features/escape
@@ -4,7 +4,8 @@ $description = "Test various types of escaping in makefiles.";
$details = "\
Make sure that escaping of ':' works in target names.
Make sure escaping of whitespace works in target names.
-Make sure that escaping of '#' works.";
+Make sure that escaping of '#' works.
+Make sure that backslash before non-special characters are kept.";
close(MAKEFILE);
@@ -62,5 +63,13 @@ foo foo\\:bar foo\\\\\\:bar foo\\\\\\\\\\:bar: ; @echo '$@'
!,
'', "foo:bar\nfoo\\:bar\nfoo\\\\:bar\nfoo\n");
+# Test backslash before non-special chars: should be kept as-is
+
+run_make_test(q!
+all: ..\foo
+.DEFAULT: ; @echo '$@'
+!,
+ '', '..\foo');
+
# This tells the test driver that the perl test script executed properly.
1;