From owner-svn-src-all@FreeBSD.ORG Fri May 31 14:45:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F2DC4853; Fri, 31 May 2013 14:45:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E5007885; Fri, 31 May 2013 14:45:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4VEjPGV029368; Fri, 31 May 2013 14:45:25 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4VEjPb7029367; Fri, 31 May 2013 14:45:25 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201305311445.r4VEjPb7029367@svn.freebsd.org> From: Jilles Tjoelker Date: Fri, 31 May 2013 14:45:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251180 - head/tools/regression/bin/sh/builtins X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 31 May 2013 14:45:26 -0000 Author: jilles Date: Fri May 31 14:45:25 2013 New Revision: 251180 URL: http://svnweb.freebsd.org/changeset/base/251180 Log: sh: Add test cases for break outside a loop. In most shells (including our sh), break outside a loop does nothing with status 0, or at least does not abort. Therefore, scripts sometimes (buggily) depend on this. Added: head/tools/regression/bin/sh/builtins/break4.4 (contents, props changed) head/tools/regression/bin/sh/builtins/break5.4 (contents, props changed) Added: head/tools/regression/bin/sh/builtins/break4.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/break4.4 Fri May 31 14:45:25 2013 (r251180) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +# Although this is not specified by POSIX, some configure scripts (gawk 4.1.0) +# appear to depend on it. + +break +exit 4 Added: head/tools/regression/bin/sh/builtins/break5.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/break5.4 Fri May 31 14:45:25 2013 (r251180) @@ -0,0 +1,12 @@ +# $FreeBSD$ + +# Although this is not specified by POSIX, some configure scripts (gawk 4.1.0) +# appear to depend on it. +# In some uncommitted code, the subshell environment corrupted the outer +# shell environment's state. + +(for i in a b c; do + exit 3 +done) +break +exit 4