summary refs log tree commit diff
path: root/Test/Z02zmathfunc.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/Z02zmathfunc.ztst')
-rw-r--r--Test/Z02zmathfunc.ztst23
1 files changed, 23 insertions, 0 deletions
diff --git a/Test/Z02zmathfunc.ztst b/Test/Z02zmathfunc.ztst
new file mode 100644
index 000000000..94bc59576
--- /dev/null
+++ b/Test/Z02zmathfunc.ztst
@@ -0,0 +1,23 @@
+%prep
+  autoload -Uz zmathfunc && zmathfunc
+
+%test
+
+  echo $(( min(42, 43) )) $(( max(42, 43) )) $(( sum(42, 43) ))
+  echo $(( min(42) )) $(( max(42) )) $(( sum(42) ))
+  echo $(( sum() ))
+0:basic functionality test
+>42 43 85
+>42 42 42
+>0
+
+
+  (set -e; echo $(( min(0,   42) )))
+  (set -e; echo $(( max(0,  -42) )))
+  (set -e; echo $(( sum(42, -42) )))
+-f:regression test for ERR_EXIT 
+>0
+>0
+>0
+
+%clean