diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-15 02:07:47 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-04-15 02:07:47 +0000 |
commit | f4a2945e37e7fde9d94fd91ab4bd8581bde8c1ec (patch) | |
tree | 2c4ee9ca36b1be1b1d0b0705dc490e4bb2ec1e10 /t/lib/u-first.t | |
parent | b331eff569892bc48ecf1dfb07fd993b8b19c1a4 (diff) | |
download | perl-f4a2945e37e7fde9d94fd91ab4bd8581bde8c1ec.tar.gz |
Add Scalar-List-Utils 1.02, from Graham Barr.
Now we have blessed, reftype, tainted, first, reduce, ...
p4raw-id: //depot/perl@9702
Diffstat (limited to 't/lib/u-first.t')
-rwxr-xr-x | t/lib/u-first.t | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/t/lib/u-first.t b/t/lib/u-first.t new file mode 100755 index 0000000000..71f3de41f5 --- /dev/null +++ b/t/lib/u-first.t @@ -0,0 +1,20 @@ +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; +} + +use List::Util qw(first); + +print "1..4\n"; + +print "not " unless defined &first; +print "ok 1\n"; + +print "not " unless 9 == first { 8 == ($_ - 1) } 9,4,5,6; +print "ok 2\n"; + +print "not " if defined(first { 0 } 1,2,3,4); +print "ok 3\n"; + +print "not " if defined(first { 0 }); +print "ok 4\n"; |