]> git.saurik.com Git - apple/shell_cmds.git/blame_incremental - sh/tests/builtins/local3.0
shell_cmds-216.60.1.tar.gz
[apple/shell_cmds.git] / sh / tests / builtins / local3.0
... / ...
CommitLineData
1# $FreeBSD: head/bin/sh/tests/builtins/local3.0 251797 2013-06-15 22:22:03Z jilles $
2
3f() {
4 local "$@"
5 set -a
6 x=7
7 case $- in
8 *a*) : ;;
9 *) echo In-function \$- bad
10 esac
11 [ "$x" = 7 ] || echo In-function \$x bad
12}
13x=1
14case $- in
15*a*) echo Initial \$- bad
16esac
17f x -
18case $- in
19*a*) echo Intermediate \$- bad
20esac
21[ "$x" = 1 ] || echo Intermediate \$x bad
22f - x
23case $- in
24*a*) echo Final \$- bad
25esac
26[ "$x" = 1 ] || echo Final \$x bad