7 require Config; import Config;
8 keys %Config; # Silence warning
9 if ($Config{extensions} !~ /\bList\/Util\b/) {
10 print "1..0 # Skip: List::Util was not built\n";
17 use List::Util qw(minstr);
21 print "not " unless defined &minstr;
24 print "not " unless minstr('a') eq 'a';
27 print "not " unless minstr('a','b') eq 'a';
30 print "not " unless minstr('B','A') eq 'A';
33 my @a = map { pack("u", pack("C*",map { int(rand(256))} (0..int(rand(10) + 2)))) } 0 .. 20;
34 my @b = sort { $a cmp $b } @a;
35 print "not " unless minstr(@a) eq $b[0];