svn commit: r245383 - head/tools/regression/bin/sh/execution

Jilles Tjoelker jilles at FreeBSD.org
Sun Jan 13 19:39:15 UTC 2013


Author: jilles
Date: Sun Jan 13 19:39:13 2013
New Revision: 245383
URL: http://svnweb.freebsd.org/changeset/base/245383

Log:
  sh: Add some testcases related to subshells.
  
  These failed in earlier attempts to execute more subshells without forking.
  The patches are uncommitted.

Added:
  head/tools/regression/bin/sh/execution/subshell1.0   (contents, props changed)
  head/tools/regression/bin/sh/execution/subshell1.0.stdout   (contents, props changed)
  head/tools/regression/bin/sh/execution/subshell2.0   (contents, props changed)
  head/tools/regression/bin/sh/execution/subshell3.0   (contents, props changed)
  head/tools/regression/bin/sh/execution/subshell4.0   (contents, props changed)

Added: head/tools/regression/bin/sh/execution/subshell1.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/subshell1.0	Sun Jan 13 19:39:13 2013	(r245383)
@@ -0,0 +1,6 @@
+# $FreeBSD$
+
+(eval "cd /
+v=$(printf %0100000d 1)
+echo \${#v}")
+echo end

Added: head/tools/regression/bin/sh/execution/subshell1.0.stdout
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/subshell1.0.stdout	Sun Jan 13 19:39:13 2013	(r245383)
@@ -0,0 +1,2 @@
+100000
+end

Added: head/tools/regression/bin/sh/execution/subshell2.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/subshell2.0	Sun Jan 13 19:39:13 2013	(r245383)
@@ -0,0 +1,10 @@
+# $FreeBSD$
+
+f() {
+	x=2
+}
+(
+	x=1
+	f
+	[ "$x" = 2 ]
+)

Added: head/tools/regression/bin/sh/execution/subshell3.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/subshell3.0	Sun Jan 13 19:39:13 2013	(r245383)
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+(false; exit) && exit 3
+exit 0

Added: head/tools/regression/bin/sh/execution/subshell4.0
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/tools/regression/bin/sh/execution/subshell4.0	Sun Jan 13 19:39:13 2013	(r245383)
@@ -0,0 +1,3 @@
+# $FreeBSD$
+
+(eval "set v=1"; false) && echo bad; :


More information about the svn-src-head mailing list