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
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to