summaryrefslogtreecommitdiffstats
path: root/Test/C01arith.ztst
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2014-01-23 10:32:59 +0000
committerPeter Stephenson <pws@zsh.org>2014-01-23 10:32:59 +0000
commit22b8fd6da931657ec930ba2625179c704de3e830 (patch)
tree2266493aa799af7431af9308fd6cb7e088fb668e /Test/C01arith.ztst
parentunposted: reformulate 32285 to lift the fheap->sp test out of the loop, impro... (diff)
downloadzsh-22b8fd6da931657ec930ba2625179c704de3e830.tar
zsh-22b8fd6da931657ec930ba2625179c704de3e830.tar.gz
zsh-22b8fd6da931657ec930ba2625179c704de3e830.tar.bz2
zsh-22b8fd6da931657ec930ba2625179c704de3e830.tar.lz
zsh-22b8fd6da931657ec930ba2625179c704de3e830.tar.xz
zsh-22b8fd6da931657ec930ba2625179c704de3e830.tar.zst
zsh-22b8fd6da931657ec930ba2625179c704de3e830.zip
32299: add use of underscores on arithmetic output for spacing
Diffstat (limited to 'Test/C01arith.ztst')
-rw-r--r--Test/C01arith.ztst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Test/C01arith.ztst b/Test/C01arith.ztst
index 7b005c2ab..25cd8b83a 100644
--- a/Test/C01arith.ztst
+++ b/Test/C01arith.ztst
@@ -266,3 +266,19 @@
>48.5
>77.5
>63.5
+
+ underscore_integer() {
+ setopt cbases localoptions
+ print $(( [#_] 1000000 ))
+ print $(( [#16_] 65536 ))
+ print $(( [#16_4] 65536 * 32768 ))
+ }
+ underscore_integer
+0:Grouping output with underscores: integers
+>1_000_000
+>0x10_000
+>0x8000_0000
+
+ print $(( [#_] (5. ** 10) / 16. ))
+0:Grouping output with underscores: floating point
+>610_351.562_5