3 # Test MM->_installed_file_for_module()
8 if( $ENV{PERL_CORE} ) {
17 use ExtUtils::MakeMaker;
23 my($have, $want, $name) = @_;
25 $have = File::Spec->canonpath($have);
26 $want = File::Spec->canonpath($want);
28 my $builder = Test::More->builder;
29 return $builder->is_eq( $have, $want, $name );
32 # Test when a module is not installed
34 ok !MM->_installed_file_for_module("aaldkfjaldj"), "Module not installed";
35 ok !MM->_installed_file_for_module("aaldkfjaldj::dlajldkj");
38 # Try a single name module
40 my $want = $INC{'strict.pm'};
41 path_is( MM->_installed_file_for_module("strict"), $want, "single name module" );
46 my $want = $INC{"Test/More.pm"};
47 path_is( MM->_installed_file_for_module("Test::More"), $want, "Foo::Bar style" );