Date: Sun, 22 Aug 2010 11:04:30 +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: r211609 - head/tools/regression/bin/sh/builtins Message-ID: <201008221104.o7MB4Ung001538@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun Aug 22 11:04:30 2010 New Revision: 211609 URL: http://svn.freebsd.org/changeset/base/211609 Log: sh: Add a test for breaking from a loop outside the current function. It is unwise to rely on this but I'd like to know if this would break. Added: head/tools/regression/bin/sh/builtins/break3.0 (contents, props changed) Added: head/tools/regression/bin/sh/builtins/break3.0 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/builtins/break3.0 Sun Aug 22 11:04:30 2010 (r211609) @@ -0,0 +1,15 @@ +# $FreeBSD$ + +# We accept this and people might rely on it. +# However, various other shells do not accept it. + +f() { + break + echo bad1 +} + +while :; do + f + echo bad2 + exit 2 +done
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008221104.o7MB4Ung001538>