]>
Commit | Line | Data |
---|---|---|
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 | ||
17 | a=0 x="a=1" | |
18 | ((0?x:0)) | |
19 | echo $a | |
20 | unset a x | |
21 | ||
22 | a=0 x="a=1" | |
23 | ((1?0:x)) | |
24 | echo $a | |
25 | unset a x | |
26 | ||
27 | a=0 x="a=1" | |
28 | ((0?(x):0)) | |
29 | echo $a | |
30 | unset a x | |
31 | ||
32 | a=0 x="a=1" | |
33 | ((0?$x:0)) | |
34 | echo $a | |
35 | unset a x | |
36 | ||
37 | a=0 x="a=1" | |
38 | ((0&&x)) | |
39 | echo $a | |
40 | unset a x | |
41 | ||
42 | a=0 x="a=1" | |
43 | ((1||x)) | |
44 | echo $a | |
45 | unset a x | |
46 | ||
47 | a=0 | |
48 | ((0?arr[a=1]:0)) | |
49 | echo $a | |
50 | unset a |