local3.0 revision 251797
1251797Sjilles# $FreeBSD: head/tools/regression/bin/sh/builtins/local3.0 251797 2013-06-15 22:22:03Z jilles $ 2251797Sjilles 3251797Sjillesf() { 4251797Sjilles local "$@" 5251797Sjilles set -a 6251797Sjilles x=7 7251797Sjilles case $- in 8251797Sjilles *a*) : ;; 9251797Sjilles *) echo In-function \$- bad 10251797Sjilles esac 11251797Sjilles [ "$x" = 7 ] || echo In-function \$x bad 12251797Sjilles} 13251797Sjillesx=1 14251797Sjillescase $- in 15251797Sjilles*a*) echo Initial \$- bad 16251797Sjillesesac 17251797Sjillesf x - 18251797Sjillescase $- in 19251797Sjilles*a*) echo Intermediate \$- bad 20251797Sjillesesac 21251797Sjilles[ "$x" = 1 ] || echo Intermediate \$x bad 22251797Sjillesf - x 23251797Sjillescase $- in 24251797Sjilles*a*) echo Final \$- bad 25251797Sjillesesac 26251797Sjilles[ "$x" = 1 ] || echo Final \$x bad 27