about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2021-04-16 19:08:03 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2021-04-16 19:08:11 +0000
commitdee6e67d6084be034b43f57e7ab75d4eb7065976 (patch)
tree280ed6033d4c63fd1cf680aa470deb0055143c9b
parent6a6ec300487c0d6fff62788367e68dbf6e96ab38 (diff)
downloadzsh-dee6e67d6084be034b43f57e7ab75d4eb7065976.tar.gz
zsh-dee6e67d6084be034b43f57e7ab75d4eb7065976.tar.xz
zsh-dee6e67d6084be034b43f57e7ab75d4eb7065976.zip
unposted (cf. 48153): Add tests for max() and min().
-rw-r--r--ChangeLog5
-rw-r--r--Test/Z02zmathfunc.ztst24
2 files changed, 29 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index c7c3ce63c..9516ae66e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-16  Daniel Shahaf  <d.s@daniel.shahaf.name>
+
+	* unposted (cf. 48153): Test/Z02zmathfunc.ztst: Add tests for
+	max() and min().
+
 2021-04-15  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* 48574/0008: Doc/Zsh/contrib.yo: vcs_info git: Use best
diff --git a/Test/Z02zmathfunc.ztst b/Test/Z02zmathfunc.ztst
index 43a0a0d76..343c10563 100644
--- a/Test/Z02zmathfunc.ztst
+++ b/Test/Z02zmathfunc.ztst
@@ -20,4 +20,28 @@
 >0
 >0
 
+ echo $(( min(42, 43, 44) ))
+ echo $(( min(44, 42, 43) ))
+ echo $(( min(43, 44, 42) ))
+ #
+ echo $(( max(42, 43, 44) ))
+ echo $(( max(44, 42, 43) ))
+ echo $(( max(43, 44, 42) ))
+0:min() and max() with three arguments
+>42
+>42
+>42
+>44
+>44
+>44
+
+ echo $(( min() ))
+1:error test for min()
+?(eval):1: wrong number of arguments: min()
+
+ echo $(( max() ))
+1:error test for max()
+?(eval):1: wrong number of arguments: max()
+
+
 %clean