Commit | Line | Data |
820f978f |
1 | use strictures 1; |
2 | use Test::More; |
3 | use FindBin; |
4 | |
5 | use System::Introspector::Probe::Perls; |
6 | |
7 | do { |
8 | no warnings 'redefine'; |
cdde15e1 |
9 | *System::Introspector::Probe::Perls::_find_possible_perl_configs = sub { |
10 | map "$FindBin::Bin/data/perls/$_/lib/Config.pm", '5.10.0', '5.14.2', |
11 | }; |
820f978f |
12 | }; |
13 | |
14 | my $probe = System::Introspector::Probe::Perls->new( |
cdde15e1 |
15 | root => "$FindBin::Bin/data/perls", |
820f978f |
16 | ); |
17 | |
18 | my $result = $probe->gather; |
19 | ok $result, 'received data'; |
20 | |
21 | is $result->{__error__}, undef, 'no errors'; |
f587318e |
22 | is $result->{perls}{"$FindBin::Bin/data/perls/5.10.0/lib/Config.pm"} |
23 | ->{config}{version}, |
24 | '5.10.0', |
25 | 'version for 5.10.0'; |
26 | is $result->{perls}{"$FindBin::Bin/data/perls/5.14.2/lib/Config.pm"} |
27 | ->{config}{version}, |
28 | '5.14.2', |
29 | 'version for 5.14.2'; |
820f978f |
30 | |
31 | done_testing; |