Author: jilles
Date: Sun Jul 15 10:22:13 2012
New Revision: 238469
URL: http://svn.freebsd.org/changeset/base/238469

Log:
  sh: Add a simple test for the "local" builtin.

Added:
  head/tools/regression/bin/sh/builtins/local1.0   (contents, props changed)

Added: head/tools/regression/bin/sh/builtins/local1.0
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/bin/sh/builtins/local1.0      Sun Jul 15 10:22:13 
2012        (r238469)
@@ -0,0 +1,13 @@
+# $FreeBSD$
+# A commonly used but non-POSIX builtin.
+
+f() {
+       local x
+       x=2
+       [ "$x" = 2 ]
+}
+x=1
+f || exit 3
+[ "$x" = 1 ] || exit 3
+f || exit 3
+[ "$x" = 1 ] || exit 3
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to