commit bash-20200529 snapshot

This commit is contained in:
Chet Ramey
2020-06-03 18:31:24 -04:00
parent 37adc8b99d
commit f9df535553
16 changed files with 221 additions and 36 deletions
+1 -2
View File
@@ -28,7 +28,7 @@ if [ -x /usr/bin/false ]; then
elif [ -x /bin/false ]; then
binfalse=/bin/false
else
binfalse=true
binfalse=false
fi
shopt -s lastpipe
@@ -71,4 +71,3 @@ ${THIS_SH} ./lastpipe1.sub
echo lastpipe1.sub returns $?
${THIS_SH} ./lastpipe2.sub
+2
View File
@@ -159,3 +159,5 @@ after: 42
a+=3
foo
foo
./redir11.sub: line 75: 42: No such file or directory
42
+9
View File
@@ -65,3 +65,12 @@ a=2
a=9 eval echo foo >&$(echo $a)
a=2
a=9 eval echo foo '2>&1 >&$(echo $a)' | { grep -q 'Bad file' || echo 'redir11 bad 9'; }
# double expansion of filenames when used in redirection error messages
# present in bash versions back to at least bash-1.13
# this is executed in the tests subdirectory of the source directory, so there
# definitely should not be a file named `42'
unset foo
: <$((foo+=42))
echo $foo
+4
View File
@@ -256,6 +256,10 @@ bbb 4 5 6
ccc 7 8 9
declare -a x=([0]="one" [1]="two" [2]="three")
./varenv19.sub: line 51: declare: x: not found
declare -x v="x"
declare -x v="t"
declare -- v
declare -x v
a=z
a=b
a=z
+1
View File
@@ -257,6 +257,7 @@ ${THIS_SH} ./varenv16.sub
${THIS_SH} ./varenv17.sub
${THIS_SH} ./varenv18.sub
${THIS_SH} ./varenv19.sub
${THIS_SH} ./varenv20.sub
# make sure variable scoping is done right
tt() { typeset a=b;echo a=$a; };a=z;echo a=$a;tt;echo a=$a
+13
View File
@@ -0,0 +1,13 @@
# tests of local variables with the same name as variables passed in the
# temporary environment
f() { local v=x; local -p; }
v=t f
f() { local v; declare -p v; }
v=t f
f() { local v=x; unset v; declare -p v; }
v=g
f
v=t f