mirror of
https://github.com/mirror/make.git
synced 2026-08-30 11:18:08 +08:00
Verify that backslashes before non-special characters are preserved.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user