This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ext/Devel-Peek/t/Peek.t: Don't leave PATH tainted.
[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;
7use Test::More tests => 3;
8use_ok("version", 0.9905);
9
10# do strict lax tests in a sub to isolate a package to test importing
11SKIP: {
12 eval "use List::Util qw(reduce);";
13 skip 'No reduce() in List::Util', 2
14 if $@;
15
16 # use again to get the import()
17 use List::Util qw(reduce);
18 {
19 my $fail = 0;
20 my $ret = reduce {
21 version->parse($a);
22 $fail++ unless defined $a;
23 1
24 } "0.039", "0.035";
25 is $fail, 0, 'reduce() with parse';
26 }
27
28 {
29 my $fail = 0;
30 my $ret = reduce {
31 version->qv($a);
32 $fail++ unless defined $a;
33 1
34 } "0.039", "0.035";
35 is $fail, 0, 'reduce() with qv';
36 }
37}