Re: A new PerlIO coredump
[p5sagit/p5-mst-13.2.git] / t / lib / u-max.t
CommitLineData
f4a2945e 1BEGIN {
2 chdir 't' if -d 't';
3 @INC = '../lib';
4}
5
6use List::Util qw(max);
7
8print "1..5\n";
9
10print "not " unless defined &max;
11print "ok 1\n";
12
13print "not " unless max(1) == 1;
14print "ok 2\n";
15
16print "not " unless max(1,2) == 2;
17print "ok 3\n";
18
19print "not " unless max(2,1) == 2;
20print "ok 4\n";
21
22my @a = map { rand() } 1 .. 20;
23my @b = sort { $a <=> $b } @a;
24print "not " unless max(@a) == $b[-1];
25print "ok 5\n";