fix for dequoting words in pretty-print mode; posix mode changes for readonly/export invalid identifier errors

This commit is contained in:
Chet Ramey
2024-01-02 10:42:34 -05:00
parent aa2d23cfac
commit fa0b002927
20 changed files with 1531 additions and 1361 deletions
+3 -8
View File
@@ -156,14 +156,6 @@ hash -d
set +o hashall
hash -p ${THIS_SH} ${THIS_SH##*/}
# bad identifiers to declare/readonly/export
export AA[4]
readonly AA[4]
export invalid-var=4
readonly invalid-var=4
export invalid-var
readonly invalid-var
declare -a AA
unset AA[-2]
@@ -376,6 +368,9 @@ ${THIS_SH} ./errors9.sub
# invalid numeric arguments and too many arguments
${THIS_SH} ./errors10.sub
# invalid identifiers to readonly/export
${THIS_SH} ./errors11.sub
${THIS_SH} -c 'return ; echo after return' bash
${THIS_SH} -o posix -c 'return ; echo after return' bash