commit bash-20200814 snapshot

This commit is contained in:
Chet Ramey
2020-08-19 09:44:01 -04:00
parent 6dc203b865
commit 4d2700970a
8 changed files with 96 additions and 8 deletions
+11
View File
@@ -708,6 +708,17 @@ aaa bb
'a b' 'c d' 'e f'
0 "zero" 1 "one" 2 "two" 3 "three"
0 "zero z" 1 "one o" 2 "two t" 3 "three t"
declare -a foo=()
ai
declare -ai foo
bash: line 1: foo: unbound variable
ai
declare -ai foo
bash: line 1: !bar: unbound variable
a
a
a
a
argv[1] = </>
argv[1] = </>
+3
View File
@@ -628,6 +628,9 @@ ${THIS_SH} ./new-exp13.sub
# new K parameter transformation operator
${THIS_SH} ./new-exp14.sub
# ongoing work with a/A parameter transformations and `nounset'
${THIS_SH} ./new-exp15.sub
# problems with stray CTLNUL in bash-4.0-alpha
unset a
a=/a
+29
View File
@@ -0,0 +1,29 @@
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
: ${THIS_SH:=./bash}
${THIS_SH} -c 'declare -a foo=() ; declare -p foo' bash
${THIS_SH} -c 'declare -ia foo=() ; echo ${foo@a} ; echo ${foo@A}' bash
${THIS_SH} -uc 'declare -ia foo=() ; echo ${foo@a} ; echo ${foo@A}' bash
${THIS_SH} -c 'declare -ia foo=() ; bar=foo; echo ${!bar@a} ; echo ${!bar@A}' bash
${THIS_SH} -uc 'declare -ia foo=() ; bar=foo; echo ${!bar@a} ; echo ${!bar@A}' bash
${THIS_SH} -c 'declare -a foo=( [1]=one ) ; echo ${foo@a}' bash
${THIS_SH} -uc 'declare -a foo=( [1]=one ) ; echo ${foo@a}' bash
${THIS_SH} -c 'declare -a foo=( [1]=one ) ; bar=foo; echo ${!bar@a}' bash
${THIS_SH} -uc 'declare -a foo=( [1]=one ) ; bar=foo; echo ${!bar@a}' bash