documentation updates; fix for null commands with redirection expansion errors; changes to job notifications for interactive shells sourcing files; fix underflow issue with word_top

This commit is contained in:
Chet Ramey
2024-08-28 11:42:10 -04:00
parent 2e01122fe7
commit 2610d40b32
19 changed files with 175 additions and 21 deletions
+6 -1
View File
@@ -330,6 +330,11 @@ bash: line 1: readonly: `AA[4]': not a valid identifier
array: 1
sh: line 1: export: `AA[4]': not a valid identifier
sh: line 1: readonly: `AA[4]': not a valid identifier
bash: -c: line 5: syntax error: unexpected end of file from command on line 1
bash: -c: line 3: syntax error: unexpected end of file from command on line 1
bash: -c: line 4: syntax error: unexpected end of file from command on line 1
bash: -c: line 5: syntax error: unexpected end of file from command on line 1
bash: -c: line 7: syntax error: unexpected end of file from command on line 1
bash: line 1: return: can only `return' from a function or sourced script
after return
bash: line 1: return: can only `return' from a function or sourced script
@@ -338,4 +343,4 @@ sh: line 1: unset: `a-b': not a valid identifier
sh: line 1: /nosuchfile: No such file or directory
sh: line 1: trap: SIGNOSIG: invalid signal specification
after trap
./errors.tests: line 393: `!!': not a valid identifier
./errors.tests: line 396: `!!': not a valid identifier
+3
View File
@@ -371,6 +371,9 @@ ${THIS_SH} ./errors10.sub
# invalid identifiers to readonly/export
${THIS_SH} ./errors11.sub
# EOF when parsing compound commands
${THIS_SH} ./errors12.sub
${THIS_SH} -c 'return ; echo after return' bash
${THIS_SH} -o posix -c 'return ; echo after return' bash
+42
View File
@@ -0,0 +1,42 @@
: ${THIS_SH:=./bash}
# various error messages about incomplete compound commands
${THIS_SH} -c 'if
true; true
then
echo foo bar' bash
${THIS_SH} -c 'while false; do
echo true' bash
${THIS_SH} -c 'until false
do
echo false
' bash
${THIS_SH} -c 'for f
in 1 2 3
do
: ; :' bash
${THIS_SH} -c 'case foo in
bar) if false
then
true
fi
;;
' bash
# this tripped up ubsan
x()
{
case y in
z)
if (! false); then
foo=bar
fi
;;
esac
}