This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade version from version 0.9908 to 0.9909
[perl5.git] / cpan / version / t / 09_list_util.t
CommitLineData
95a23f5d
JP
1# Before `make install' is performed this script should be runnable with
2# `make test'. After `make install' it should work as `perl test.pl'
3
4#########################
5
6use strict;
da891a41 7use_ok("version", 0.9909);
effa684c 8use Test::More;
95a23f5d 9
effa684c
JP
10BEGIN {
11 eval "use List::Util qw(reduce)";
12 if ($@) {
13 plan skip_all => "No List::Util::reduce() available";
14 } else {
15 plan tests => 3;
95a23f5d 16 }
effa684c 17}
95a23f5d 18
effa684c
JP
19# do strict lax tests in a sub to isolate a package to test importing
20# use again to get the import()
21use List::Util qw(reduce);
22{
23 my $fail = 0;
24 my $ret = reduce {
25 version->parse($a);
26 $fail++ unless defined $a;
27 1
28 } "0.039", "0.035";
29 is $fail, 0, 'reduce() with parse';
30}
31
32{
33 my $fail = 0;
34 my $ret = reduce {
35 version->qv($a);
36 $fail++ unless defined $a;
37 1
38 } "0.039", "0.035";
39 is $fail, 0, 'reduce() with qv';
95a23f5d 40}