about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-01-15 13:52:08 +0000
committerPeter Stephenson <pws@zsh.org>2015-01-15 13:52:40 +0000
commit3a99ef322dafcd2cf833b2a0668436ac120df1b3 (patch)
tree1572509835aab319e5f89ed239d12a3d19518a25 /Test
parentc7aa6443907ddd97b6b1e8729ce9c897de0d244c (diff)
downloadzsh-3a99ef322dafcd2cf833b2a0668436ac120df1b3.tar.gz
zsh-3a99ef322dafcd2cf833b2a0668436ac120df1b3.tar.xz
zsh-3a99ef322dafcd2cf833b2a0668436ac120df1b3.zip
34280: more widespread use of FORCE_FLOAT.
Add the case of variables read for use in arithmetic expressions.
Diffstat (limited to 'Test')
-rw-r--r--Test/C01arith.ztst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst
index 8e0730d8d..ea87af257 100644
--- a/Test/C01arith.ztst
+++ b/Test/C01arith.ztst
@@ -308,3 +308,13 @@
 >2
 >2
 # It's hard to test for integer to float.
+
+  integer ff1=3 ff2=4
+  print $(( ff1/ff2 ))
+  setopt force_float
+  print $(( ff1/ff2 ))
+  unsetopt force_float
+0:Variables are forced to floating point where necessary
+# 0.75 is exactly representable, don't expect rounding error.
+>0
+>0.75