svn commit: r315179 - stable/10/bin/sh/tests/expansion
Jilles Tjoelker
jilles at FreeBSD.org
Sun Mar 12 19:49:10 UTC 2017
Author: jilles
Date: Sun Mar 12 19:49:08 2017
New Revision: 315179
URL: https://svnweb.freebsd.org/changeset/base/315179
Log:
MFC r314637: sh: Add some already working tests that exercise new code paths
Added:
stable/10/bin/sh/tests/expansion/cmdsubst18.0
- copied unchanged from r314637, head/bin/sh/tests/expansion/cmdsubst18.0
stable/10/bin/sh/tests/expansion/cmdsubst19.0
- copied unchanged from r314637, head/bin/sh/tests/expansion/cmdsubst19.0
stable/10/bin/sh/tests/expansion/cmdsubst20.0
- copied unchanged from r314637, head/bin/sh/tests/expansion/cmdsubst20.0
Modified:
stable/10/bin/sh/tests/expansion/Makefile
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/bin/sh/tests/expansion/Makefile
==============================================================================
--- stable/10/bin/sh/tests/expansion/Makefile Sun Mar 12 19:28:44 2017 (r315178)
+++ stable/10/bin/sh/tests/expansion/Makefile Sun Mar 12 19:49:08 2017 (r315179)
@@ -38,6 +38,9 @@ FILES+= cmdsubst14.0
FILES+= cmdsubst15.0
FILES+= cmdsubst16.0
FILES+= cmdsubst17.0
+FILES+= cmdsubst18.0
+FILES+= cmdsubst19.0
+FILES+= cmdsubst20.0
FILES+= export1.0
FILES+= export2.0
FILES+= export3.0
Copied: stable/10/bin/sh/tests/expansion/cmdsubst18.0 (from r314637, head/bin/sh/tests/expansion/cmdsubst18.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/10/bin/sh/tests/expansion/cmdsubst18.0 Sun Mar 12 19:49:08 2017 (r315179, copy of r314637, head/bin/sh/tests/expansion/cmdsubst18.0)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+x=X
+unset n
+r=${x+$(echo a)}${x-$(echo b)}${n+$(echo c)}${n-$(echo d)}$(echo e)
+[ "$r" = aXde ]
Copied: stable/10/bin/sh/tests/expansion/cmdsubst19.0 (from r314637, head/bin/sh/tests/expansion/cmdsubst19.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/10/bin/sh/tests/expansion/cmdsubst19.0 Sun Mar 12 19:49:08 2017 (r315179, copy of r314637, head/bin/sh/tests/expansion/cmdsubst19.0)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+b=200 c=30 d=5 x=4
+r=$(echo a)$(($(echo b) + ${x+$(echo c)} + ${x-$(echo d)}))$(echo e)
+[ "$r" = a234e ]
Copied: stable/10/bin/sh/tests/expansion/cmdsubst20.0 (from r314637, head/bin/sh/tests/expansion/cmdsubst20.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/10/bin/sh/tests/expansion/cmdsubst20.0 Sun Mar 12 19:49:08 2017 (r315179, copy of r314637, head/bin/sh/tests/expansion/cmdsubst20.0)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+set -T
+trapped=''
+trap "trapped=x$trapped" USR1
+[ "x$(kill -USR1 $$)y" = xy ] && [ "$trapped" = x ]
More information about the svn-src-stable
mailing list