svn commit: r317514 - head/bin/sh/tests/expansion
Jilles Tjoelker
jilles at FreeBSD.org
Thu Apr 27 18:52:20 UTC 2017
Author: jilles
Date: Thu Apr 27 18:52:18 2017
New Revision: 317514
URL: https://svnweb.freebsd.org/changeset/base/317514
Log:
sh: Add some tests for command substitution final newline stripping.
Added:
head/bin/sh/tests/expansion/cmdsubst25.0 (contents, props changed)
head/bin/sh/tests/expansion/cmdsubst26.0 (contents, props changed)
Modified:
head/bin/sh/tests/expansion/Makefile
Modified: head/bin/sh/tests/expansion/Makefile
==============================================================================
--- head/bin/sh/tests/expansion/Makefile Thu Apr 27 18:21:38 2017 (r317513)
+++ head/bin/sh/tests/expansion/Makefile Thu Apr 27 18:52:18 2017 (r317514)
@@ -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
Added: head/bin/sh/tests/expansion/cmdsubst25.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/bin/sh/tests/expansion/cmdsubst25.0 Thu Apr 27 18:52:18 2017 (r317514)
@@ -0,0 +1,7 @@
+# $FreeBSD$
+
+IFS=' '
+set -- `printf '\n '`
+IFS=:
+[ "$*" = '
+' ]
Added: head/bin/sh/tests/expansion/cmdsubst26.0
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/bin/sh/tests/expansion/cmdsubst26.0 Thu Apr 27 18:52:18 2017 (r317514)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+nl='
+'
+v=$nl`printf '\n'`
+[ "$v" = "$nl" ]
More information about the svn-src-head
mailing list