]> git.saurik.com Git - apple/shell_cmds.git/blame - sh/tests/builtins/local3.0
shell_cmds-198.tar.gz
[apple/shell_cmds.git] / sh / tests / builtins / local3.0
CommitLineData
71aad674
A
1# $FreeBSD$
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