diff options
author | Daniel Shahaf <d.s@daniel.shahaf.name> | 2021-04-16 19:08:03 +0000 |
---|---|---|
committer | Daniel Shahaf <d.s@daniel.shahaf.name> | 2021-04-16 19:08:11 +0000 |
commit | dee6e67d6084be034b43f57e7ab75d4eb7065976 (patch) | |
tree | 280ed6033d4c63fd1cf680aa470deb0055143c9b /Test/Z02zmathfunc.ztst | |
parent | 6a6ec300487c0d6fff62788367e68dbf6e96ab38 (diff) | |
download | zsh-dee6e67d6084be034b43f57e7ab75d4eb7065976.tar.gz zsh-dee6e67d6084be034b43f57e7ab75d4eb7065976.tar.xz zsh-dee6e67d6084be034b43f57e7ab75d4eb7065976.zip |
unposted (cf. 48153): Add tests for max() and min().
Diffstat (limited to 'Test/Z02zmathfunc.ztst')
-rw-r--r-- | Test/Z02zmathfunc.ztst | 24 |
1 files changed, 24 insertions, 0 deletions
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 |