about summary refs log tree commit diff
path: root/Test
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
parent6c603a412751c810ba04bcd463cd3595091ca391 (diff)
downloadzsh-22b8fd6da931657ec930ba2625179c704de3e830.tar.gz
zsh-22b8fd6da931657ec930ba2625179c704de3e830.tar.xz
zsh-22b8fd6da931657ec930ba2625179c704de3e830.zip
32299: add use of underscores on arithmetic output for spacing
Diffstat (limited to 'Test')
-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