2 $description = "Test backslash-newline handling.";
9 # Backslash-newlines in recipes
11 # These are basic backslash-newlines with no tricks
12 run_make_test("fast:;\@echo fa\\\nst\n",
15 run_make_test("slow:;\@: no-op; echo sl\\\now\n",
18 run_make_test("dquote:;\@echo \"dqu\\\note\"\n",
21 run_make_test("squote:;\@echo 'squ\\\note'\n",
24 # Ensure that a leading prefix character is omitted
25 run_make_test("fast:;\@echo fa\\\n\tst\n",
28 run_make_test("slow:;\@: no-op; echo sl\\\n\tow\n",
31 run_make_test("dquote:;\@echo \"dqu\\\n\tote\"\n",
34 run_make_test("squote:;\@echo 'squ\\\n\tote'\n",
37 # Ensure that ONLY the leading prefix character is omitted
38 run_make_test("fast:;\@echo fa\\\n\t st\n",
41 run_make_test("slow:;\@: no-op; echo sl\\\n\t\tow\n",
44 run_make_test("dquote:;\@echo \"dqu\\\n\t ote\"\n",
47 run_make_test("squote:;\@echo 'squ\\\n\t\t ote'\n",
50 # Backslash-newlines in variable values
56 var:;@echo '|$(var)|'!,
59 # Condense trailing space
63 var:;@echo '|$(var)|'!,
66 # Remove leading space
70 var:;@echo '|$(var)|'!,
73 # Multiple bs/nl condensed
79 var:;@echo '|$(var)|'!,
82 # POSIX: Preserve trailing space
88 var:;@echo '|$(var)|'!,
91 # POSIX: One space per bs-nl
99 var:;@echo '|$(var)|'!,