From: Paul Smith Date: Sun, 9 Sep 2012 22:37:13 +0000 (+0000) Subject: Verify that backslashes before non-special characters are preserved. X-Git-Tag: moved-to-git~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d3743dfdc0de4d5867325ca8295034773ad26cf;p=thirdparty%2Fmake.git Verify that backslashes before non-special characters are preserved. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index aa572d30..cc1724c3 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,8 @@ 2012-09-09 Paul Smith + * 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. diff --git a/tests/scripts/features/escape b/tests/scripts/features/escape index 0d4427e2..9b2adb5c 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;