1 # This program is free software: you can redistribute it and/or modify
2 # it under the terms of the GNU General Public License as published by
3 # the Free Software Foundation, either version 3 of the License, or
4 # (at your option) any later version.
6 # This program is distributed in the hope that it will be useful,
7 # but WITHOUT ANY WARRANTY; without even the implied warranty of
8 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9 # GNU General Public License for more details.
11 # You should have received a copy of the GNU General Public License
12 # along with this program. If not, see <http://www.gnu.org/licenses/>.
32 echo $(case a in (a) echo sh_352.26ax; esac )
33 echo $(case a in (a) echo sh_352.26ay; esac)
35 echo $((echo sh_352.25a);(echo sh_352.25b))
37 echo $(echo sh_352.27 ')' ")" \)
42 echo abc # a comment with )
63 echo $(for f in \); do echo a; done )
64 echo $(case a in a) echo sh_352.26a; esac )
65 echo $(case a in a) echo sh_352.26a; esac)
92 echo $(( 4<(2+3) ? 1 : 32))
104 k=$(case x in x) echo k;; esac)
109 example) echo foobix;;
134 recho "wx$(echo abcde)yz"
135 recho "$(echo abcde)"
181 case x in x) echo x;; esac
185 case x in x) echo x;; esac # followed by a comment
189 case x in (x) echo x;; esac
197 echo comment # with )
214 here-doc terminated with a parenthesis
220 ' # or a single back- or doublequote
225 echo line terminated with a backslash # \
228 ${THIS_SH} ./comsub-posix1.sub
230 ${THIS_SH} ./comsub-posix2.sub
232 ${THIS_SH} ./comsub-posix3.sub
234 # produced a parse error through bush-4.0-beta2
237 # produced a parse error through bush-4.1
241 # a comment with " ' \
246 # fixed after bush-4.0 released
247 : $(case a in a) echo ;; # comment
250 # fixed after bush-4.3 released
252 echo test | while read line; do
254 test) echo saw test ;;
260 # recommended to be parsed as a nested comsub instead of arithsub
261 echo $(( echo ab cde ) )