capture origin/<name> of active branch in case remote is not tracked
[scpubgit/System-Introspector.git] / t / perls.t
CommitLineData
820f978f 1use strictures 1;
2use Test::More;
3use FindBin;
4
5use System::Introspector::Probe::Perls;
6
7do {
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
14my $probe = System::Introspector::Probe::Perls->new(
cdde15e1 15 root => "$FindBin::Bin/data/perls",
820f978f 16);
17
18my $result = $probe->gather;
19ok $result, 'received data';
20
21is $result->{__error__}, undef, 'no errors';
f587318e 22is $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';
26is $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
31done_testing;