--- /dev/null
+use strictures 1;
+use Test::More;
+use FindBin;
+
+use System::Introspector::LibDirs::Perl;
+
+my $dir = "$FindBin::Bin/data/libdir/perl";
+
+no warnings 'redefine';
+*System::Introspector::LibDirs::Perl::_open_locate_libdirs_pipe = sub {
+ my $output = "$dir/lib/perl5\n";
+ open my $fh, '<', \$output;
+ return $fh;
+};
+
+my $probe = System::Introspector::LibDirs::Perl->new(
+ root => $dir,
+);
+my $data = $probe->gather;
+
+my $sha = delete $data->{"$dir/lib/perl5"}{Foo}[0]{sha256_hex};
+ok $sha, 'contains SHA fingerprint';
+
+my $size = delete $data->{"$dir/lib/perl5"}{Foo}[0]{size};
+ok $size, 'contains file size';
+
+is_deeply $data, {
+ "$dir/lib/perl5" => {
+ Foo => [
+ { file => "$dir/lib/perl5/Foo.pm", version => 0.001 },
+ ],
+ },
+}, 'package found';
+
+done_testing;