Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Apr 2017 18:52:18 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r317514 - head/bin/sh/tests/expansion
Message-ID:  <201704271852.v3RIqImd009992@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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" ]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704271852.v3RIqImd009992>