Bug introduced in 74091dd4e8.
Dan Church 2022-12-21 14:41:36 -06:00
parent ec8113b986
commit e573113317
Signed by: h3xx
GPG Key ID: EA2BF379CD2CDBD0
5 changed files with 32 additions and 0 deletions

View File

@ -388,6 +388,8 @@ tests/set-e-test Chet Ramey
tests/set-e.right Chet Ramey
tests/strip.tests Chet Ramey
tests/strip.right Chet Ramey
tests/subshell.right Dan Church
tests/subshell.tests Dan Church
tests/tilde-tests Chet Ramey
tests/tilde.right Chet Ramey
tests/unicode1.sub Chet Ramey, John Kearney

View File

@ -1474,6 +1474,8 @@ tests/shopt1.sub f
tests/shopt.right f
tests/strip.tests f
tests/strip.right f
tests/subshell.tests f
tests/subshell.right f
tests/test.tests f
tests/test1.sub f
tests/test.right f

2
tests/run-subshell Normal file
View File

@ -0,0 +1,2 @@
${THIS_SH} ./subshell.tests > ${BASH_TSTOUT} 2>&1
diff ${BASH_TSTOUT} subshell.right && rm -f ${BASH_TSTOUT}

4
tests/subshell.right Normal file
View File

@ -0,0 +1,4 @@
1st script executing
2nd script starting
3rd script starting
1st script still executing

22
tests/subshell.tests Normal file
View File

@ -0,0 +1,22 @@
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
sub1=$(mktemp)
sub2=$(mktemp)
sub3=$(mktemp)
echo '( echo "1st script executing" ; . '"$sub2"' ; echo "1st script still executing" )' >"$sub1"
echo 'echo "2nd script starting" && ${THIS_SH} '"$sub3" >"$sub2"
echo 'echo "3rd script starting"' >"$sub3"
. "$sub1"