]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/arith8.sub
Bash-5.2-rc4 release
[thirdparty/bash.git] / tests / arith8.sub
CommitLineData
8868edaf
CR
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.
5#
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.
10#
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/>.
13#
d233b485
CR
14# problems with evaluation of wrong terms in conditional expressions through
15# bash-4.4
16
17a=0 x="a=1"
18((0?x:0))
19echo $a
20unset a x
21
22a=0 x="a=1"
23((1?0:x))
24echo $a
25unset a x
26
27a=0 x="a=1"
28((0?(x):0))
29echo $a
30unset a x
31
32a=0 x="a=1"
33((0?$x:0))
34echo $a
35unset a x
36
37a=0 x="a=1"
38((0&&x))
39echo $a
40unset a x
41
42a=0 x="a=1"
43((1||x))
44echo $a
45unset a x
46
47a=0
48((0?arr[a=1]:0))
49echo $a
50unset a