3 # Test MM->_installed_file_for_module()
14 use ExtUtils::MakeMaker;
20 my($have, $want, $name) = @_;
22 $have = File::Spec->canonpath($have);
23 $want = File::Spec->canonpath($want);
25 my $builder = Test::More->builder;
26 return $builder->is_eq( $have, $want, $name );
29 # Test when a module is not installed
31 ok !MM->_installed_file_for_module("aaldkfjaldj"), "Module not installed";
32 ok !MM->_installed_file_for_module("aaldkfjaldj::dlajldkj");
35 # Try a single name module
37 my $want = $INC{'less.pm'};
38 path_is( MM->_installed_file_for_module("less"), $want, "single name module" );
43 my $want = $INC{"Test/More.pm"};
44 path_is( MM->_installed_file_for_module("Test::More"), $want, "Foo::Bar style" );