From owner-svn-src-all@FreeBSD.ORG Thu Dec 30 15:04:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7266B1065693; Thu, 30 Dec 2010 15:04:59 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 61CA68FC0A; Thu, 30 Dec 2010 15:04:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id oBUF4xeH042715; Thu, 30 Dec 2010 15:04:59 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id oBUF4xhx042713; Thu, 30 Dec 2010 15:04:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201012301504.oBUF4xhx042713@svn.freebsd.org> From: Jilles Tjoelker Date: Thu, 30 Dec 2010 15:04:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r216819 - head/tools/regression/bin/sh/expansion X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Dec 2010 15:04:59 -0000 Author: jilles Date: Thu Dec 30 15:04:59 2010 New Revision: 216819 URL: http://svn.freebsd.org/changeset/base/216819 Log: sh: Add two tests for special cases in command substitution that already work in stable/8. Added: head/tools/regression/bin/sh/expansion/cmdsubst8.0 (contents, props changed) head/tools/regression/bin/sh/expansion/cmdsubst9.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/cmdsubst8.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst8.0 Thu Dec 30 15:04:59 2010 (r216819) @@ -0,0 +1,17 @@ +# $FreeBSD$ +# Not required by POSIX (although referenced in a non-normative section), +# but possibly useful. + +: hi there & +p=$! +q=$(jobs -l $p) + +# Change tabs to spaces. +set -f +set -- $q +r="$*" + +case $r in +*" $p "*) ;; +*) echo Pid missing; exit 3 ;; +esac Added: head/tools/regression/bin/sh/expansion/cmdsubst9.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/cmdsubst9.0 Thu Dec 30 15:04:59 2010 (r216819) @@ -0,0 +1,11 @@ +# $FreeBSD$ + +set -e + +cd / +dummy=$(cd /bin) +[ "$(pwd)" = / ] + +v=1 +dummy=$(eval v=2) +[ "$v" = 1 ]