aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-10-30 14:24:42 +0000
committerRon Yorston <rmy@pobox.com>2022-10-30 14:24:42 +0000
commit28af22c256a385db7d65a42ff6de0b8573131236 (patch)
treef63a5819a0c705211cd9183559cf5a4f03f7aba6 /testsuite
parent663319cec41bbff8b6e0e47fee7fedc84acfeafc (diff)
downloadbusybox-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-xtestsuite/make.tests13
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'
308cd .. || exit 1; rm -rf make.tempdir 2>/dev/null 308cd .. || 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'.
312testing "make replace escaped NL in macro in command with space" \
313 "make -f -" \
314 "a b a b\n" "" '
315M=word
316N=${M:word=a\
317b}
318target:
319 @echo ${N} ${M:word=a\
320b}
321'
322
310testing "make double-colon rule" \ 323testing "make double-colon rule" \
311 "make -f -" "target1\ntarget2\n" "" ' 324 "make -f -" "target1\ntarget2\n" "" '
312target:: 325target::