diff options
author | Ron Yorston <rmy@pobox.com> | 2022-10-30 14:24:42 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-10-30 14:24:42 +0000 |
commit | 28af22c256a385db7d65a42ff6de0b8573131236 (patch) | |
tree | f63a5819a0c705211cd9183559cf5a4f03f7aba6 /testsuite | |
parent | 663319cec41bbff8b6e0e47fee7fedc84acfeafc (diff) | |
download | busybox-w32-28af22c256a385db7d65a42ff6de0b8573131236.tar.gz busybox-w32-28af22c256a385db7d65a42ff6de0b8573131236.tar.bz2 busybox-w32-28af22c256a385db7d65a42ff6de0b8573131236.zip |
make: different treatment for escaped NL in macro in command
Austin Group defect report 1549 has been accepted. It requires
that an escaped newline inside a macro expansion in a command is
replaced by a space. Other escaped newlines in commands are
left in place, as before.
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/make.tests | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testsuite/make.tests b/testsuite/make.tests index 35d3b7149..8b46faf3c 100755 --- a/testsuite/make.tests +++ b/testsuite/make.tests | |||
@@ -307,6 +307,19 @@ target: file1 .WAIT file2 | |||
307 | ' | 307 | ' |
308 | cd .. || exit 1; rm -rf make.tempdir 2>/dev/null | 308 | cd .. || exit 1; rm -rf make.tempdir 2>/dev/null |
309 | 309 | ||
310 | # Escaped newlines inside macro expansions in commands get different | ||
311 | # treatment than those outside. In POSIX 2017 the output is 'a b ab'. | ||
312 | testing "make replace escaped NL in macro in command with space" \ | ||
313 | "make -f -" \ | ||
314 | "a b a b\n" "" ' | ||
315 | M=word | ||
316 | N=${M:word=a\ | ||
317 | b} | ||
318 | target: | ||
319 | @echo ${N} ${M:word=a\ | ||
320 | b} | ||
321 | ' | ||
322 | |||
310 | testing "make double-colon rule" \ | 323 | testing "make double-colon rule" \ |
311 | "make -f -" "target1\ntarget2\n" "" ' | 324 | "make -f -" "target1\ntarget2\n" "" ' |
312 | target:: | 325 | target:: |