svn commit: r238469 - head/tools/regression/bin/sh/builtins
Jilles Tjoelker
jilles at FreeBSD.org
Sun Jul 15 10:22:14 UTC 2012
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
More information about the svn-src-head
mailing list