sh: Add some tests for command substitution final newline stripping.

This commit is contained in:
Jilles Tjoelker 2017-04-27 18:52:18 +00:00
parent d7f27102b5
commit 24b55fb76d
3 changed files with 15 additions and 0 deletions

View File

@ -46,6 +46,8 @@ ${PACKAGE}FILES+= cmdsubst21.0
${PACKAGE}FILES+= cmdsubst22.0
${PACKAGE}FILES+= cmdsubst23.0
${PACKAGE}FILES+= cmdsubst24.0
${PACKAGE}FILES+= cmdsubst25.0
${PACKAGE}FILES+= cmdsubst26.0
${PACKAGE}FILES+= export1.0
${PACKAGE}FILES+= export2.0
${PACKAGE}FILES+= export3.0

View File

@ -0,0 +1,7 @@
# $FreeBSD$
IFS=' '
set -- `printf '\n '`
IFS=:
[ "$*" = '
' ]

View File

@ -0,0 +1,6 @@
# $FreeBSD$
nl='
'
v=$nl`printf '\n'`
[ "$v" = "$nl" ]