mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-13 15:10:49 +02:00
readline fix for rl_undo_list pointer aliasing; arith command sets word_top
This commit is contained in:
@@ -166,4 +166,27 @@ after FUNCNEST unset: f = 201
|
||||
./func4.sub: line 23: foo: maximum function nesting level exceeded (20)
|
||||
1
|
||||
after FUNCNEST assign: f = 38
|
||||
11111 ()
|
||||
{
|
||||
printf "FUNCNAME: %s\n" $FUNCNAME
|
||||
}
|
||||
function a=2 ()
|
||||
{
|
||||
printf "FUNCNAME: %s\n" $FUNCNAME
|
||||
}
|
||||
function 11111 ()
|
||||
{
|
||||
printf "FUNCNAME: %s\n" $FUNCNAME
|
||||
}
|
||||
function a=2 ()
|
||||
{
|
||||
printf "FUNCNAME: %s\n" $FUNCNAME
|
||||
}
|
||||
FUNCNAME: a=2
|
||||
break is a function
|
||||
break ()
|
||||
{
|
||||
echo FUNCNAME: $FUNCNAME
|
||||
}
|
||||
FUNCNAME: break
|
||||
5
|
||||
|
||||
@@ -166,6 +166,7 @@ export -f zf
|
||||
|
||||
${THIS_SH} -c 'type -t zf'
|
||||
${THIS_SH} -c 'type zf'
|
||||
unset -f zf
|
||||
|
||||
${THIS_SH} ./func1.sub
|
||||
|
||||
@@ -179,6 +180,9 @@ ${THIS_SH} ./func3.sub
|
||||
# FUNCNEST testing
|
||||
${THIS_SH} ./func4.sub
|
||||
|
||||
# function naming restrictions
|
||||
${THIS_SH} ./func5.sub
|
||||
|
||||
unset -f myfunction
|
||||
myfunction() {
|
||||
echo "bad shell function redirection"
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
# 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/>.
|
||||
#
|
||||
|
||||
function a=2
|
||||
{
|
||||
printf "FUNCNAME: %s\n" $FUNCNAME
|
||||
}
|
||||
|
||||
function 11111
|
||||
{
|
||||
printf "FUNCNAME: %s\n" $FUNCNAME
|
||||
}
|
||||
|
||||
declare -f
|
||||
set -o posix
|
||||
declare -f
|
||||
set +o posix
|
||||
|
||||
a\=2
|
||||
|
||||
break()
|
||||
{
|
||||
echo FUNCNAME: $FUNCNAME
|
||||
}
|
||||
|
||||
type break
|
||||
\break
|
||||
@@ -1,5 +1,12 @@
|
||||
# catch-all for parsing problems that don't fit anywhere else
|
||||
|
||||
# word_top issues in bash-5.2
|
||||
case x in x) if ((1)); then :; fi ;; esac
|
||||
case x in x) if ((1)); then :; fi esac
|
||||
|
||||
case x in x) if ((true ) ); then :; fi ;; esac
|
||||
case x in x) if ((true ) ); then :; fi esac
|
||||
|
||||
# this has to be in a separate file to get desired EOF behavior
|
||||
${THIS_SH} ./parser1.sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user