commit bash-20180329 snapshot

This commit is contained in:
Chet Ramey
2018-04-02 10:00:50 -04:00
parent 12933b5bc7
commit 13b0033c46
11 changed files with 86 additions and 9 deletions
+2 -1
View File
@@ -1164,6 +1164,7 @@ tests/parser.right f
tests/parser1.sub f
tests/posix2.tests f
tests/posix2.right f
tests/posix2syntax.sub f
tests/posixexp.tests f
tests/posixexp.right f
tests/posixexp1.sub f
@@ -1188,6 +1189,7 @@ tests/printf3.sub f
tests/printf4.sub f
tests/procsub.tests f
tests/procsub.right f
tests/procsub1.sub f
tests/quote.tests f
tests/quote.right f
tests/quote1.sub f
@@ -1215,7 +1217,6 @@ tests/redir8.sub f
tests/redir9.sub f
tests/redir10.sub f
tests/redir11.sub f
tests/redir12.sub f
tests/rhs-exp.tests f
tests/rhs-exp.right f
tests/rhs-exp1.sub f
+1 -1
View File
@@ -6712,7 +6712,7 @@ In the absence of any traps, Bash ignores @code{SIGTERM}
@item
In the absence of any traps, @code{SIGINT} is caught and handled
((@pxref{Signals}).
(@pxref{Signals}).
@code{SIGINT} will interrupt some shell builtins.
@item
+15
View File
@@ -1 +1,16 @@
AAA
bash5: `invalid-name': not a valid identifier
in
in
in
in
bash5: -c: line 0: syntax error near unexpected token `)'
bash5: -c: line 0: `case x in esac) echo done; esac'
in
bash5: -c: line 0: syntax error near unexpected token `do'
bash5: -c: line 0: `case in do do) echo in; esac'
bash5: -c: line 0: syntax error near unexpected token `('
bash5: -c: line 0: `for()'
in
done
ok 1
+2
View File
@@ -2,3 +2,5 @@
# this has to be in a separate file to get desired EOF behavior
${THIS_SH} ./parser1.sub
${THIS_SH} ./posix2syntax.sub
+53
View File
@@ -0,0 +1,53 @@
: ${THIS_SH:=./bash}
bashname=bash${BASH_VERSION%%.*}
# tests for Posix grammar special cases
# Posix grammar rule 5
${THIS_SH} -c 'for invalid-name in a b c; do echo error; done' $bashname
# Posix grammar rule 6: third word in FOR or SELECT
for i; do echo; done; echo in
for i; do echo in; done
for i do echo in; done
select i; do echo; done; echo in
select i; do echo in; done; echo in
select i do echo in; done; echo in
# Posix grammar rule 4: when PATTERN == ESAC, return ESAC
${THIS_SH} -c 'case x in esac) echo done; esac' $bashname
# Posix grammar rule 6: third word in CASE
${THIS_SH} -c 'case in in in) echo in; esac;' $bashname
${THIS_SH} -c 'case in do do) echo in; esac' $bashname
# Posix grammar rule 8: function NAME
${THIS_SH} -o posix -c 'for()
{
echo function for;
}' $bashname
for for in for; do echo in; echo done; done
${THIS_SH} -c 'for (( i = 0; i < 5; i++ )) do : ; done' $bashname
${THIS_SH} -c 'for (( i = 0; i < 5; i++ )) { : ; }' $bashname
# bug report: IN turning on unwanted alias expansion
${THIS_SH} -o posix -c '
alias foo='two words'
foo_word='foo'
case "$foo_word"
in
foo) echo "bad 1";;
esac' $bashname
${THIS_SH} -o posix -c '
alias foo='oneword'
foo_word='foo'
case "$foo_word"
in
foo) echo "ok 1";;
esac' $bashname
+1
View File
@@ -26,3 +26,4 @@ extern
0
0
0
123
+2
View File
@@ -91,3 +91,5 @@ EOF
${THIS_SH} -c "source $FN <(date)"
rm -f $FN
${THIS_SH} ./procsub1.sub
+5
View File
@@ -0,0 +1,5 @@
# make sure we can wait for the last process substitution, since it sets $!
cat <(exit 123) >/dev/null
wait "$!"
echo $?
-1
View File
@@ -157,4 +157,3 @@ a+=3
foo
foo
./redir11.sub: line 53: $(echo $a): Bad file descriptor
123
-1
View File
@@ -191,4 +191,3 @@ ${THIS_SH} ./redir9.sub
${THIS_SH} ./redir10.sub
${THIS_SH} ./redir11.sub
${THIS_SH} ./redir12.sub
+5 -5
View File
@@ -1,5 +1,5 @@
# make sure we can wait for the last process substitution, since it sets $!
cat <(exit 123) >/dev/null
wait "$!"
echo $?
umask 0777
cat <<' HERE'
look ma, no permissions
HERE
cat <<<"it's a miracle"