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 27