Bash-4.4 distribution sources and documentation

This commit is contained in:
Chet Ramey 2016-09-15 16:59:08 -04:00
commit a0c0a00fc4
588 changed files with 130746 additions and 80164 deletions

43
tests/nameref14.sub Normal file
View file

@ -0,0 +1,43 @@
# exporting namerefs and putting namerefs in temp env post bash-4.3
typeset -nx ref=var;
typeset -p ref
var=foo; str=''
printenv ref # var
ref+=$str printenv ref # var
ref+="$str" printenv ref # var
ref=$ref$str printenv ref # var
export ref # follows nameref and exports var
printenv var # foo
ref+=$str printenv var # foo
ref+="$str" printenv var # foo
ref=$ref$str printenv var # foo
# none of these should change ref; should follow the nameref and export var
unset var; unset -n ref; typeset -n ref=var
echo before
typeset -p ref var
echo first
ref=xxx typeset -p ref var
echo invalid
var= ref=5 typeset -p ref var
echo after
typeset -p ref var
# ref isn't exported, so none of the printenvs should print anything
unset var ; unset -n ref
typeset -n ref=var;
typeset -p ref
var=foo; str=''
printenv ref
ref+=$str printenv ref
ref+="$str" printenv ref
ref=$ref$str printenv ref