2 $description = "Test various types of escaping in makefiles.";
5 Make sure that escaping of ':' works in target names.
6 Make sure escaping of whitespace works in target names.
7 Make sure that escaping of '#' works.
8 Make sure that backslash before non-special characters are kept.";
14 $(path)foo : ; @echo "touch ($@)"
16 foo\ bar: ; @echo "touch ($@)"
19 foo\#bar.ext: ; @echo "foo#bar.ext = ($@)"',
23 # TEST 2: This one should fail, since the ":" is unquoted.
27 "#MAKEFILE#:2: *** target pattern contains no '%'. Stop.",
30 # TEST 3: This one should work, since we escape the ":".
36 # TEST 4: This one should fail, since the escape char is escaped.
40 "#MAKEFILE#:2: *** target pattern contains no '%'. Stop.",
43 # TEST 5: This one should work
49 # TEST 6: Test escaped comments
53 'foo#bar.ext = (foo#bar.ext)');
55 # Test escaped colons in prerequisites
56 # Quoting of backslashes in q!! is kind of messy.
57 # Solaris sh does not properly handle backslashes even in '' so just
58 # check the output make prints, not what the shell interprets.
60 foo: foo\\:bar foo\\\\\\:bar foo\\\\\\\\\\:bar
61 foo foo\\:bar foo\\\\\\:bar foo\\\\\\\\\\:bar: ; : '$@'
63 '', ": 'foo:bar'\n: 'foo\\:bar'\n: 'foo\\\\:bar'\n: 'foo'\n");
65 # Test backslash before non-special chars: should be kept as-is
73 # This tells the test driver that the perl test script executed properly.