]>
Commit | Line | Data |
---|---|---|
71aad674 A |
1 | # $FreeBSD$ |
2 | ||
3 | f() { | |
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 | } | |
13 | x=1 | |
14 | case $- in | |
15 | *a*) echo Initial \$- bad | |
16 | esac | |
17 | f x - | |
18 | case $- in | |
19 | *a*) echo Intermediate \$- bad | |
20 | esac | |
21 | [ "$x" = 1 ] || echo Intermediate \$x bad | |
22 | f - x | |
23 | case $- in | |
24 | *a*) echo Final \$- bad | |
25 | esac | |
26 | [ "$x" = 1 ] || echo Final \$x bad |