mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-04 10:50:50 +02:00
commit bash-20160408 snapshot
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
THIS=alias2
|
||||
FN=$THIS.script
|
||||
FN=$TMPDIR/$THIS.script
|
||||
|
||||
cat > $FN <<'EOF'
|
||||
#
|
||||
|
||||
@@ -24,11 +24,11 @@ env -i BASH_FUNC_X%%='() { (a)=>\' ${THIS_SH} -c cve7169-bad 2>/dev/null
|
||||
: < cve7169-bad
|
||||
rm -f cve7169-bad
|
||||
|
||||
echo cve7169-bad2 > bar
|
||||
echo cve7169-bad2 > $TMPDIR/bar
|
||||
rm -f cve7169-bad2
|
||||
eval 'X() { (a)>\' ; . ./bar 2>/dev/null
|
||||
: < cve7169-bad2
|
||||
rm -f cve7169-bad2 bar
|
||||
rm -f cve7169-bad2 $TMPDIR/bar
|
||||
|
||||
# CVE-2014-7186
|
||||
${THIS_SH} ./exportfunc1.sub
|
||||
|
||||
@@ -100,3 +100,8 @@ a.log
|
||||
a.log
|
||||
. ..
|
||||
a.log
|
||||
.x .y .z
|
||||
a b c
|
||||
.x .y .z a b c
|
||||
a b c
|
||||
a b c
|
||||
|
||||
@@ -372,4 +372,6 @@ ${THIS_SH} ./extglob1a.sub
|
||||
|
||||
${THIS_SH} ./extglob3.sub
|
||||
|
||||
${THIS_SH} ./extglob4.sub
|
||||
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
: ${TMPDIR:=/tmp}
|
||||
GTDIR=$TMPDIR/extglob4-$$
|
||||
|
||||
shopt -s extglob
|
||||
[ -d "${GTDIR}" ] || mkdir "${GTDIR}"
|
||||
cd "${GTDIR}" || {
|
||||
echo "extglob4: cannot cd to ${GTDIR}"
|
||||
exit 2
|
||||
}
|
||||
|
||||
touch a b c .x .y .z
|
||||
echo .!(|.) # correct
|
||||
echo * # correct
|
||||
|
||||
echo @(*|.!(|.)) # wrong, adds . and ..
|
||||
echo @(*|@(f)) # ??
|
||||
echo @(*|@(ff))
|
||||
|
||||
cd /
|
||||
rm -rf $GTDIR
|
||||
|
||||
[[ a = a*?(/)b ]] && echo bad match 1
|
||||
+6
-6
@@ -59,13 +59,13 @@ qux
|
||||
bar
|
||||
qux
|
||||
abc def geh
|
||||
./heredoc3.sub: line 6: warning: here-document at line 4 delimited by end-of-file (wanted `EOF')
|
||||
./heredoc3.sub: line 9: warning: here-document at line 7 delimited by end-of-file (wanted `EOF')
|
||||
= here is the text =
|
||||
./heredoc3.sub: line 12: warning: here-document at line 10 delimited by end-of-file (wanted `EOF')
|
||||
./heredoc3.sub: line 15: warning: here-document at line 13 delimited by end-of-file (wanted `EOF')
|
||||
this paren ) is not a problem
|
||||
./heredoc3.sub: line 18: warning: here-document at line 16 delimited by end-of-file (wanted `EOF')
|
||||
./heredoc3.sub: line 21: warning: here-document at line 19 delimited by end-of-file (wanted `EOF')
|
||||
these balanced parens ( ) are not a problem
|
||||
./heredoc3.sub: line 24: warning: here-document at line 22 delimited by end-of-file (wanted `EOF')
|
||||
./heredoc3.sub: line 27: warning: here-document at line 25 delimited by end-of-file (wanted `EOF')
|
||||
quoted balanced parens \( ) are not a problem either
|
||||
more text in a subshell
|
||||
some more text in a different subshell
|
||||
@@ -82,8 +82,8 @@ end helloEND
|
||||
hello
|
||||
\END
|
||||
end hello<NL>\END
|
||||
./heredoc3.sub: line 75: warning: here-document at line 73 delimited by end-of-file (wanted `EOF')
|
||||
./heredoc3.sub: line 76: syntax error: unexpected end of file
|
||||
./heredoc3.sub: line 78: warning: here-document at line 76 delimited by end-of-file (wanted `EOF')
|
||||
./heredoc3.sub: line 79: syntax error: unexpected end of file
|
||||
comsub here-string
|
||||
./heredoc.tests: line 105: warning: here-document at line 103 delimited by end-of-file (wanted `EOF')
|
||||
hi
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
SAVEPWD=$PWD
|
||||
cd $TMPDIR || echo "heredoc3.sub: cannot cd to $TMPDIR" >&2
|
||||
|
||||
text=$(cat <<EOF
|
||||
here is the text
|
||||
EOF)
|
||||
|
||||
+1
-1
@@ -109,6 +109,6 @@ shopt -q -o history
|
||||
echo $?
|
||||
|
||||
${THIS_SH} ./history1.sub
|
||||
rm foohist-*
|
||||
rm -f $TMPDIR/foohist-*
|
||||
|
||||
${THIS_SH} ./history2.sub
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
trap 'rm -f $HISTFILE' 0 1 2 3 6 15
|
||||
|
||||
HISTFILE=foohist-$$
|
||||
HISTFILE=$TMPDIR/foohist-$$
|
||||
unset HISTIGNORE HISTCONTROL
|
||||
set -o history
|
||||
|
||||
|
||||
Reference in New Issue
Block a user