summaryrefslogtreecommitdiff
path: root/tests/arith8.sub
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2016-11-14 13:46:09 -0500
committerChet Ramey <chet.ramey@case.edu>2016-11-14 13:46:09 -0500
commit216e2e9b8ba21fff677cf7794ef3d9af8c91d46d (patch)
treedf673f82d50fed0a7bb082d3133c510a5a680228 /tests/arith8.sub
parent78a3f8a4bae8ef98daa26b64ddbc03c6fc3ffcd0 (diff)
downloadbash-216e2e9b8ba21fff677cf7794ef3d9af8c91d46d.tar.gz
commit bash-20161111 snapshot
Diffstat (limited to 'tests/arith8.sub')
-rw-r--r--tests/arith8.sub37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/arith8.sub b/tests/arith8.sub
new file mode 100644
index 00000000..1ab0895e
--- /dev/null
+++ b/tests/arith8.sub
@@ -0,0 +1,37 @@
+# problems with evaluation of wrong terms in conditional expressions through
+# bash-4.4
+
+a=0 x="a=1"
+((0?x:0))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((1?0:x))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((0?(x):0))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((0?$x:0))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((0&&x))
+echo $a
+unset a x
+
+a=0 x="a=1"
+((1||x))
+echo $a
+unset a x
+
+a=0
+((0?arr[a=1]:0))
+echo $a
+unset a