summaryrefslogtreecommitdiffstats
path: root/tests/arith8.sub
diff options
context:
space:
mode:
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 0000000..1ab0895
--- /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