From dee6e67d6084be034b43f57e7ab75d4eb7065976 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 16 Apr 2021 19:08:03 +0000 Subject: unposted (cf. 48153): Add tests for max() and min(). --- Test/Z02zmathfunc.ztst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'Test') 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 -- cgit v1.2.3