3 # Test MM->_installed_file_for_module()
9 use ExtUtils::MakeMaker;
15 my($have, $want, $name) = @_;
17 $have = File::Spec->canonpath($have);
18 $want = File::Spec->canonpath($want);
20 my $builder = Test::More->builder;
21 return $builder->is_eq( $have, $want, $name );
24 # Test when a module is not installed
26 ok !MM->_installed_file_for_module("aaldkfjaldj"), "Module not installed";
27 ok !MM->_installed_file_for_module("aaldkfjaldj::dlajldkj");
30 # Try a single name module
32 my $want = $INC{'strict.pm'};
33 path_is( MM->_installed_file_for_module("strict"), $want, "single name module" );
38 my $want = $INC{"Test/More.pm"};
39 path_is( MM->_installed_file_for_module("Test::More"), $want, "Foo::Bar style" );