Bash-5.2-rc1 release

This commit is contained in:
Chet Ramey
2022-06-17 09:54:51 -04:00
parent 187661b892
commit 6c1407d2a9
92 changed files with 14083 additions and 14216 deletions
+13 -7
View File
@@ -61,7 +61,6 @@ here-doc terminated with a parenthesis
line terminated with a backslash
./comsub-posix1.sub: line 1: syntax error near unexpected token `)'
./comsub-posix1.sub: line 1: `echo $( if x; then echo foo )'
after
swap32_posix is a function
swap32_posix ()
{
@@ -77,16 +76,23 @@ swap32_posix ()
));
done
}
./comsub-posix5.sub: line 37: syntax error near unexpected token `done'
./comsub-posix5.sub: line 37: `: $(case x in x) ;; x) done esac)'
./comsub-posix5.sub: line 38: syntax error near unexpected token `done'
./comsub-posix5.sub: line 38: `: $(case x in x) ;; x) done ;; esac)'
./comsub-posix5.sub: line 39: syntax error near unexpected token `esac'
./comsub-posix5.sub: line 39: `: $(case x in x) (esac) esac)'
bash: -c: line 1: syntax error near unexpected token `done'
bash: -c: line 1: `: $(case x in x) ;; x) done esac)'
bash: -c: line 1: syntax error near unexpected token `done'
bash: -c: line 1: `: $(case x in x) ;; x) done ;; esac)'
bash: -c: line 1: syntax error near unexpected token `esac'
bash: -c: line 1: `: $(case x in x) (esac) esac)'
bash: -c: line 1: syntax error near unexpected token `in'
bash: -c: line 1: `: $(case x in esac|in) foo;; esac)'
bash: -c: line 1: syntax error near unexpected token `done'
bash: -c: line 1: `: $(case x in x) ;; x) done)'
case: -c: line 3: syntax error near unexpected token `esac'
case: -c: line 3: `$( esac ; bar=foo ; echo "$bar")) echo bad 2;;'
ok 2
inside outside
ok 3
syntax-error: -c: line 2: syntax error near unexpected token `done'
syntax-error: -c: line 2: `: $(case x in x) ;; x) done ;; esac)'
yes
+1 -2
View File
@@ -234,13 +234,12 @@ echo $(
)
${THIS_SH} ./comsub-posix1.sub
${THIS_SH} ./comsub-posix2.sub
${THIS_SH} ./comsub-posix3.sub
#${THIS_SH} ./comsub-posix4.sub
${THIS_SH} ./comsub-posix5.sub
${THIS_SH} ./comsub-posix6.sub
# produced a parse error through bash-4.0-beta2
: $(echo foo)"
+1 -1
View File
@@ -1,3 +1,3 @@
echo $( if x; then echo foo )
echo after
echo should not see this
+3 -3
View File
@@ -34,9 +34,9 @@
: $(case x in x) (echo esac) esac)
# these errors should be caught sooner
: $(case x in x) ;; x) done esac)
: $(case x in x) ;; x) done ;; esac)
: $(case x in x) (esac) esac)
${THIS_SH} -c ': $(case x in x) ;; x) done esac)' bash
${THIS_SH} -c ': $(case x in x) ;; x) done ;; esac)' bash
${THIS_SH} -c ': $(case x in x) (esac) esac)' bash
# these are not errors
: $(case x in x) ;; x) eval done ;; esac)
+43
View File
@@ -0,0 +1,43 @@
: ${THIS_SH:=./bash}
# comsub should not inherit PST_COMPASSIGN
C=($(echo "${A[@]}" | \
(while read -d ' ' i; do
C=(${C/ ${i%% *} / })
done
echo ${C[@]})))
# comsub should not inherit PST_CASEPAT
${THIS_SH} -c '
case foo in
$( esac ; bar=foo ; echo "$bar")) echo bad 2;;
*) echo ok 2;;
esac
echo we should not see this' case
# comsub should not inherit PST_SUBSHELL
${THIS_SH} -c '( case foo in
( $(echo foo | cat )) echo ok 2;;
*) echo bad 2;;
esac
echo $( echo inside ) outside )' subshell
# comsub should not inherit PST_REDIRLIST
${THIS_SH} -c '
{fd}</dev/null {fd2}<$(foo=/dev/null ; echo $foo) exec
case $fd2 in
[0-9]*) echo ok 3 ;;
*) echo bad 3 ;;
esac' redirlist
# comsub should exit on syntax error while parsing
${THIS_SH} -c '
: $(case x in x) ;; x) done ;; esac)
echo after syntax error' syntax-error
+4 -4
View File
@@ -54,10 +54,10 @@ umask: usage: umask [-p] [-S] [mode]
./errors.tests: line 177: declare: VAR: readonly variable
./errors.tests: line 179: declare: unset: not found
./errors.tests: line 182: VAR: readonly variable
./errors.tests: line 185: syntax error near unexpected token `)'
./errors.tests: line 185: `: $( for z in 1 2 3; do )'
./errors.tests: line 186: syntax error near unexpected token `done'
./errors.tests: line 186: `: $( for z in 1 2 3; done )'
comsub: -c: line 1: syntax error near unexpected token `)'
comsub: -c: line 1: `: $( for z in 1 2 3; do )'
comsub: -c: line 1: syntax error near unexpected token `done'
comsub: -c: line 1: `: $( for z in 1 2 3; done )'
./errors.tests: line 189: cd: HOME not set
./errors.tests: line 190: cd: /tmp/xyz.bash: No such file or directory
./errors.tests: line 192: cd: OLDPWD not set
+3 -3
View File
@@ -181,9 +181,9 @@ declare -p unset
# iteration variable in a for statement being readonly
for VAR in 1 2 3 ; do echo $VAR; done
# parser errors
: $( for z in 1 2 3; do )
: $( for z in 1 2 3; done )
# parser errors; caught early so we have to run them in subshells
${THIS_SH} -c ': $( for z in 1 2 3; do )' comsub
${THIS_SH} -c ': $( for z in 1 2 3; done )' comsub
# various `cd' errors
( unset HOME ; cd )
+1 -1
View File
@@ -62,7 +62,7 @@ ${THIS_SH} ./intl2.sub
# test splitting on characters instead of bytes
${THIS_SH} ./intl3.sub
${THIS_SH} ./unicode1.sub 2>/dev/null
${THIS_SH} ./unicode1.sub # 2>/dev/null
${THIS_SH} ./unicode2.sub
${THIS_SH} ./unicode3.sub 2>&1
+9 -4
View File
@@ -110,14 +110,13 @@ fr_FR_ISO_8859_1=(
)
# this locale causes problems all over the place
if locale -a | grep -i '^fr_FR\.ISO8859.*1' >/dev/null ; then
if locale -a | grep -i '^fr_FR\.ISO8859.*1$' >/dev/null ; then
TestCodePage fr_FR.ISO8859-1 fr_FR_ISO_8859_1
else
echo "unicode1.sub: warning: you do not have the fr_FR.ISO8859-1 locale installed;" >&2
echo "unicode1.sub: that will cause some of these tests to fail." >&2
echo "unicode1.sub: that will cause some of these tests to be skipped." >&2
fi
zh_TW_BIG5=(
[0x00f6]=$'\366' [0x00f7]=$'\367' [0x00f8]=$'\370' [0x00f9]=$'\371' [0x00fa]=$'\372'
[0x00fb]=$'\373' [0x00fc]=$'\374' [0x00fd]=$'\375' [0x00fe]=$'\376'
@@ -316,8 +315,14 @@ jp_JP_SHIFT_JIS=(
[0xFF9E]=$'\xDE' # HALFWIDTH KATAKANA VOICED SOUND MARK
[0xFF9F]=$'\xDF' # HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK
)
#TestCodePage ja_JP.SHIFT_JIS jp_JP_SHIFT_JIS
TestCodePage ja_JP.SJIS jp_JP_SHIFT_JIS
if locale -a | grep -i '^ja_JP.SJIS' >/dev/null ; then
TestCodePage ja_JP.SJIS jp_JP_SHIFT_JIS
else
echo "unicode1.sub: warning: you do not have the ja_JP.SJIS locale installed;" >&2
echo "unicode1.sub: that will cause some of these tests to be skipped." >&2
fi
#for ((x=1;x<1000;x++)); do printf ' [0x%04x]=%-11q' "$x" "$(printf "$(printf '\\U%08x' $x)")" ; [ $(($x%5)) = 0 ] && echo; done
C_UTF_8=(