Verify that backslashes before non-special characters are preserved.
authorPaul Smith <psmith@gnu.org>
Sun, 9 Sep 2012 22:37:13 +0000 (22:37 +0000)
committerPaul Smith <psmith@gnu.org>
Sun, 9 Sep 2012 22:37:13 +0000 (22:37 +0000)
tests/ChangeLog
tests/scripts/features/escape

index aa572d305babf2012be83e6d886a1653fb7e71e2..cc1724c3b6e87aac534be2951ed2385f2bc1ac50 100644 (file)
@@ -1,5 +1,8 @@
 2012-09-09  Paul Smith  <psmith@gnu.org>
 
+       * scripts/features/escape: Check that backslashes before
+       non-special characters are not removed.
+
        * scripts/features/utf8: New test for UTF-8 support.
        See Savannah bug #36529.
 
index 0d4427e2ac780147a597cccf725135ca62b0fe98..9b2adb5c9dbc36930eaf376323d1e4848e552868 100644 (file)
@@ -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;