diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Test/Z02zmathfunc.ztst | 24 |
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 |