Commit | Line | Data |
---|---|---|
f4a2945e | 1 | BEGIN { |
2 | chdir 't' if -d 't'; | |
3 | @INC = '../lib'; | |
4 | } | |
5 | ||
6 | use List::Util qw(first); | |
7 | ||
8 | print "1..4\n"; | |
9 | ||
10 | print "not " unless defined &first; | |
11 | print "ok 1\n"; | |
12 | ||
13 | print "not " unless 9 == first { 8 == ($_ - 1) } 9,4,5,6; | |
14 | print "ok 2\n"; | |
15 | ||
16 | print "not " if defined(first { 0 } 1,2,3,4); | |
17 | print "ok 3\n"; | |
18 | ||
19 | print "not " if defined(first { 0 }); | |
20 | print "ok 4\n"; |