mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-10 12:10:35 +02:00
commit bash-20080605 snapshot
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
abmnopyz
|
||||
abmnopyz
|
||||
ab
|
||||
|
||||
|
||||
abcd
|
||||
sh_352.26ax
|
||||
sh_352.26ay
|
||||
sh_352.25a sh_352.25b
|
||||
sh_352.27 ) ) )
|
||||
abc
|
||||
here doc with )
|
||||
)
|
||||
bad' syntax
|
||||
a
|
||||
sh_352.26a
|
||||
sh_352.26a
|
||||
sh_352.26
|
||||
sh_352.26
|
||||
sh_352.26
|
||||
1
|
||||
sh_352.28 )
|
||||
sh_352.28 )
|
||||
k
|
||||
abcd
|
||||
ab
|
||||
ab
|
||||
abcde
|
||||
|
||||
argv[1] = <abcde^J >
|
||||
abcdefoo
|
||||
argv[1] = <abcde>
|
||||
argv[2] = <foo>
|
||||
argv[1] = <wxabcdeyz>
|
||||
argv[1] = <abcde>
|
||||
'
|
||||
after 1
|
||||
'
|
||||
after 2
|
||||
'
|
||||
after 3
|
||||
`
|
||||
after 4
|
||||
hello
|
||||
after 5
|
||||
'
|
||||
after 6
|
||||
x
|
||||
x
|
||||
quoted )
|
||||
comment
|
||||
here-doc with )
|
||||
here-doc terminated with a parenthesis
|
||||
' # or a single back- or doublequote
|
||||
./comsub-posix1.sub: command substitution: line 2: syntax error near unexpected token `)'
|
||||
./comsub-posix1.sub: command substitution: line 2: ` if x; then echo foo )'
|
||||
after
|
||||
@@ -0,0 +1,199 @@
|
||||
|
||||
# works right
|
||||
echo ab$(echo mnop)yz
|
||||
# works right
|
||||
echo ab$(echo mnop
|
||||
)yz
|
||||
#
|
||||
# works right
|
||||
echo $(echo ab
|
||||
)
|
||||
# works right
|
||||
echo $(
|
||||
)
|
||||
echo $()
|
||||
echo ab$()cd
|
||||
|
||||
echo $(case a in (a) echo sh_352.26ax; esac )
|
||||
echo $(case a in (a) echo sh_352.26ay; esac)
|
||||
|
||||
echo $((echo sh_352.25a);(echo sh_352.25b))
|
||||
|
||||
echo $(echo sh_352.27 ')' ")" \)
|
||||
# ) comment
|
||||
)
|
||||
|
||||
echo $(
|
||||
echo abc # a comment with )
|
||||
)
|
||||
|
||||
echo $(
|
||||
cat <<eof
|
||||
here doc with )
|
||||
eof
|
||||
)
|
||||
|
||||
echo $(
|
||||
echo ')'
|
||||
)
|
||||
|
||||
unset x
|
||||
x=$(cat <<"EOF"
|
||||
bad' syntax
|
||||
EOF
|
||||
)
|
||||
echo "$x"
|
||||
unset x
|
||||
|
||||
echo $(for f in \); do echo a; done )
|
||||
echo $(case a in a) echo sh_352.26a; esac )
|
||||
echo $(case a in a) echo sh_352.26a; esac)
|
||||
|
||||
echo $(case a in
|
||||
(a) echo sh_352.26
|
||||
;;
|
||||
esac
|
||||
)
|
||||
|
||||
echo $(case a in
|
||||
a) echo sh_352.26
|
||||
;;
|
||||
esac
|
||||
)
|
||||
|
||||
|
||||
echo $(case a in
|
||||
a) echo sh_352.26
|
||||
;;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
esac
|
||||
|
||||
)
|
||||
|
||||
echo $(( 4<(2+3) ? 1 : 32))
|
||||
|
||||
echo $(cat << end
|
||||
sh_352.28 )
|
||||
end
|
||||
)
|
||||
|
||||
echo $(cat <<- end
|
||||
sh_352.28 )
|
||||
end
|
||||
)
|
||||
|
||||
k=$(case x in x) echo k;; esac)
|
||||
echo $k
|
||||
|
||||
x=$(
|
||||
case $(ls) in
|
||||
example) echo foobix;;
|
||||
esac
|
||||
)
|
||||
|
||||
echo $( echo ab\
|
||||
cd)
|
||||
|
||||
echo `echo ab
|
||||
cd`
|
||||
|
||||
echo `echo ab #xyz
|
||||
cd`
|
||||
|
||||
echo "$(echo abcde)
|
||||
"
|
||||
|
||||
recho "$(echo abcde)
|
||||
"
|
||||
|
||||
echo $(echo abcde)\
|
||||
foo
|
||||
|
||||
recho $(echo abcde)\
|
||||
foo
|
||||
|
||||
recho "wx$(echo abcde)yz"
|
||||
recho "$(echo abcde)"
|
||||
|
||||
echo $(cat <<eof
|
||||
'
|
||||
eof
|
||||
)
|
||||
|
||||
echo after 1
|
||||
|
||||
echo $(cat <<\eof
|
||||
'
|
||||
eof
|
||||
)
|
||||
|
||||
echo after 2
|
||||
|
||||
echo "$(cat <<\eof
|
||||
'
|
||||
eof
|
||||
)"
|
||||
|
||||
echo after 3
|
||||
|
||||
echo "$(cat <<\eof
|
||||
`
|
||||
eof
|
||||
)"
|
||||
|
||||
echo after 4
|
||||
|
||||
echo $(
|
||||
cat << ')'
|
||||
hello
|
||||
)
|
||||
)
|
||||
|
||||
echo after 5
|
||||
|
||||
echo $(cat <<'eof'
|
||||
'
|
||||
eof
|
||||
)
|
||||
|
||||
echo after 6
|
||||
|
||||
echo $(
|
||||
case x in x) echo x;; esac
|
||||
)
|
||||
|
||||
echo $(
|
||||
case x in (x) echo x;; esac
|
||||
)
|
||||
|
||||
echo $(
|
||||
echo 'quoted )'
|
||||
)
|
||||
|
||||
echo $(
|
||||
echo comment # with )
|
||||
)
|
||||
|
||||
echo $(
|
||||
cat <<\eof
|
||||
here-doc with )
|
||||
eof
|
||||
)
|
||||
|
||||
echo $(
|
||||
cat <<\)
|
||||
here-doc terminated with a parenthesis
|
||||
)
|
||||
)
|
||||
|
||||
echo $(
|
||||
cat <<\eof
|
||||
' # or a single back- or doublequote
|
||||
eof
|
||||
)
|
||||
|
||||
${THIS_SH} ./comsub-posix1.sub
|
||||
@@ -0,0 +1,197 @@
|
||||
|
||||
# works right
|
||||
echo ab$(echo mnop)yz
|
||||
# works right
|
||||
echo ab$(echo mnop
|
||||
)yz
|
||||
#
|
||||
# works right
|
||||
echo $(echo ab
|
||||
)
|
||||
# works right
|
||||
echo $(
|
||||
)
|
||||
echo $()
|
||||
echo ab$()cd
|
||||
|
||||
echo $(case a in (a) echo sh_352.26ax; esac )
|
||||
echo $(case a in (a) echo sh_352.26ay; esac)
|
||||
|
||||
echo $((echo sh_352.25a);(echo sh_352.25b))
|
||||
|
||||
echo $(echo sh_352.27 ')' ")" \)
|
||||
# ) comment
|
||||
)
|
||||
|
||||
echo $(
|
||||
echo abc # a comment with )
|
||||
)
|
||||
|
||||
echo $(
|
||||
cat <<eof
|
||||
here doc with )
|
||||
eof
|
||||
)
|
||||
|
||||
echo $(
|
||||
echo ')'
|
||||
)
|
||||
|
||||
unset x
|
||||
x=$(cat <<"EOF"
|
||||
bad' syntax
|
||||
EOF
|
||||
)
|
||||
echo "$x"
|
||||
unset x
|
||||
|
||||
echo $(for f in \); do echo a; done )
|
||||
echo $(case a in a) echo sh_352.26a; esac )
|
||||
echo $(case a in a) echo sh_352.26a; esac)
|
||||
|
||||
echo $(case a in
|
||||
(a) echo sh_352.26
|
||||
;;
|
||||
esac
|
||||
)
|
||||
|
||||
echo $(case a in
|
||||
a) echo sh_352.26
|
||||
;;
|
||||
esac
|
||||
)
|
||||
|
||||
|
||||
echo $(case a in
|
||||
a) echo sh_352.26
|
||||
;;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
esac
|
||||
|
||||
)
|
||||
|
||||
echo $(( 4<(2+3) ? 1 : 32))
|
||||
|
||||
echo $(cat << end
|
||||
sh_352.28 )
|
||||
end
|
||||
)
|
||||
|
||||
echo $(cat <<- end
|
||||
sh_352.28 )
|
||||
end
|
||||
)
|
||||
|
||||
k=$(case x in x) echo k;; esac)
|
||||
echo $k
|
||||
|
||||
x=$(
|
||||
case $(ls) in
|
||||
example) echo foobix;;
|
||||
esac
|
||||
)
|
||||
|
||||
echo $( echo ab\
|
||||
cd)
|
||||
|
||||
echo `echo ab
|
||||
cd`
|
||||
|
||||
echo `echo ab #xyz
|
||||
cd`
|
||||
|
||||
echo "$(echo abcde)
|
||||
"
|
||||
|
||||
recho "$(echo abcde)
|
||||
"
|
||||
|
||||
echo $(echo abcde)\
|
||||
foo
|
||||
|
||||
recho $(echo abcde)\
|
||||
foo
|
||||
|
||||
recho "wx$(echo abcde)yz"
|
||||
recho "$(echo abcde)"
|
||||
|
||||
echo $(cat <<eof
|
||||
'
|
||||
eof
|
||||
)
|
||||
|
||||
echo after 1
|
||||
|
||||
echo $(cat <<\eof
|
||||
'
|
||||
eof
|
||||
)
|
||||
|
||||
echo after 2
|
||||
|
||||
echo "$(cat <<\eof
|
||||
'
|
||||
eof
|
||||
)"
|
||||
|
||||
echo after 3
|
||||
|
||||
echo "$(cat <<\eof
|
||||
`
|
||||
eof
|
||||
)"
|
||||
|
||||
echo after 4
|
||||
|
||||
echo $(
|
||||
cat << ')'
|
||||
hello
|
||||
)
|
||||
)
|
||||
|
||||
echo after 5
|
||||
|
||||
echo $(cat <<'eof'
|
||||
'
|
||||
eof
|
||||
)
|
||||
|
||||
echo after 6
|
||||
|
||||
echo $(
|
||||
case x in x) echo x;; esac
|
||||
)
|
||||
|
||||
echo $(
|
||||
case x in (x) echo x;; esac
|
||||
)
|
||||
|
||||
echo $(
|
||||
echo 'quoted )'
|
||||
)
|
||||
|
||||
echo $(
|
||||
echo comment # with )
|
||||
)
|
||||
|
||||
echo $(
|
||||
cat <<\eof
|
||||
here-doc with )
|
||||
eof
|
||||
)
|
||||
|
||||
echo $(
|
||||
cat <<\)
|
||||
here-doc terminated with a parenthesis
|
||||
)
|
||||
)
|
||||
|
||||
echo $(
|
||||
cat <<\eof
|
||||
' # or a single back- or doublequote
|
||||
eof
|
||||
)
|
||||
@@ -0,0 +1,3 @@
|
||||
echo $( if x; then echo foo )
|
||||
|
||||
echo after
|
||||
+4
-3
@@ -53,9 +53,10 @@ umask: usage: umask [-p] [-S] [mode]
|
||||
./errors.tests: line 159: declare: VAR: readonly variable
|
||||
./errors.tests: line 161: declare: unset: not found
|
||||
./errors.tests: line 164: VAR: readonly variable
|
||||
./errors.tests: command substitution: line 168: syntax error: unexpected end of file
|
||||
./errors.tests: command substitution: line 168: syntax error near unexpected token `done'
|
||||
./errors.tests: command substitution: line 168: ` for z in 1 2 3; done '
|
||||
./errors.tests: command substitution: line 168: syntax error near unexpected token `)'
|
||||
./errors.tests: command substitution: line 168: ` for z in 1 2 3; do )'
|
||||
./errors.tests: command substitution: line 169: syntax error near unexpected token `done'
|
||||
./errors.tests: command substitution: line 169: ` for z in 1 2 3; done )'
|
||||
./errors.tests: line 171: cd: HOME not set
|
||||
./errors.tests: line 172: cd: /tmp/xyz.bash: No such file or directory
|
||||
./errors.tests: line 174: cd: OLDPWD not set
|
||||
|
||||
@@ -54,4 +54,5 @@ exec 8<&0; cat <&8
|
||||
exec 0<&7
|
||||
exec 7<&-
|
||||
|
||||
rm -f infile
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
${THIS_SH} ./comsub-posix.tests > /tmp/xx 2>&1
|
||||
diff /tmp/xx comsub-posix.right && rm -f /tmp/xx
|
||||
Reference in New Issue
Block a user