Bash-5.3-alpha release

This commit is contained in:
Chet Ramey
2024-04-22 10:33:38 -04:00
parent f3b6bd1945
commit 622d318652
700 changed files with 136534 additions and 96420 deletions
+49 -12
View File
@@ -15,10 +15,6 @@
set +p
set +o posix
ulimit -S -c 0 2>/dev/null
ulimit -c -S -- 1000 2>/dev/null
ulimit -c 2>/dev/null
# check that break breaks loops
for i in a b c; do echo $i; break; echo bad-$i; done
echo end-1
@@ -71,6 +67,10 @@ for i in a b c; do
done
echo end
# check arguments to break and continue that exceed the loop level
for f in 1 2 3; do break -- 5; done
for f in 1 2 3; do continue -- 5; done
# check that `eval' re-evaluates arguments, but `builtin' and `command' do not
AVAR='$BVAR'
BVAR=foo
@@ -87,7 +87,7 @@ BVAR=xxx eval echo $AVAR
unset -v AVAR BVAR
# test umask
# basic umask tests
mask=$(umask)
umask 022
umask
@@ -115,6 +115,7 @@ case "$(type -t test)" in
builtin) echo oops -- enable -n test failed ;;
*) echo enable -n test worked ;;
esac
enable -n | grep test
enable test
case "$(type -t test)" in
@@ -122,6 +123,9 @@ builtin) echo enable test worked ;;
*) echo oops -- enable test failed ;;
esac
enable -d notbuiltin
enable -d test
# test options to exec
(exec -a specialname ${THIS_SH} -c 'echo $0' )
(exec -l -a specialname ${THIS_SH} -c 'echo $0' )
@@ -145,11 +149,18 @@ command -p hash rm
# check out source/.
# sourcing a zero-length-file had better not be an error
rm -f /tmp/zero-length-file
cp /dev/null /tmp/zero-length-file
. /tmp/zero-length-file
rm -f $TMPDIR/zero-length-file-$$
cp /dev/null $TMPDIR/zero-length-file-$$
. $TMPDIR/zero-length-file-$$
echo $?
rm /tmp/zero-length-file
rm $TMPDIR/zero-length-file-$$
# and sourcing a file that doesn't end in a newline had better work too
SFILE=$TMPDIR/sourced-file-$$
printf 'echo no-newline' > $SFILE
. $SFILE
rm -f $SFILE
unset -v SFILE
AVAR=AVAR
@@ -262,6 +273,13 @@ kill -l 4096
# kill -l NAME should return the signal number
kill -l ${sigone/SIG/}
# kill -l NAME should work with and without the SIG prefix
x=$(kill -l INT)
y=$(kill -l SIGINT)
[[ $x == $y ]] || echo kill -l error with SIG prefix
unset -v x y
# test behavior of shopt xpg_echo
${THIS_SH} ./builtins2.sub
@@ -280,7 +298,26 @@ ${THIS_SH} ./builtins6.sub
# test behavior of command builtin after changing it to a pseudo-keyword
${THIS_SH} ./builtins7.sub
# this must be last -- it is a fatal error
exit status
# POSIX complete symbolic umask tests
${THIS_SH} ./builtins8.sub
echo after bad exit
# hash tests
${THIS_SH} ./builtins9.sub
# help tests
${THIS_SH} ./builtins10.sub
# ulimit tests
${THIS_SH} ./builtins11.sub
# pushd/popd/dirs
${THIS_SH} ./builtins12.sub
shift 0 # succeeds silently
options=$(set -o -B 2>&1 | wc -l)
[[ $options -gt 3 ]] || echo 'set: bad -o option name parsing'
# this no longer must be last -- it is no longer a fatal error
exit status
echo after non-numeric arg to exit: $?