X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=tool%2Fcreate-moose-compatibility-tests.pl;h=950836466f3afd4ee281c19c41521d256b8dc193;hb=HEAD;hp=53e6ec10baccf6856e72df74eacac35ee99c08aa;hpb=98e392b90e66275efbacd8e33488e0b02b4960d4;p=gitmo%2FMouse.git diff --git a/tool/create-moose-compatibility-tests.pl b/tool/create-moose-compatibility-tests.pl index 53e6ec1..9508364 100644 --- a/tool/create-moose-compatibility-tests.pl +++ b/tool/create-moose-compatibility-tests.pl @@ -6,13 +6,12 @@ use File::Path (); use File::Spec (); use File::Basename (); -print "Creating compatibility tests in xt/compatibility/* ...\n"; +print "Creating compatibility tests in xt/compat/* ...\n"; -File::Path::rmtree(File::Spec->catfile('xt', 'compatibility')); +File::Path::rmtree(File::Spec->catfile('xt', 'compat')); # some test does not pass... currently skip it. my %SKIP_TEST = ( - '016-trigger.t' => "trigger's argument is incompatble :(", '810-isa-or.t' => "Mouse has a bug", '052-undefined-type-in-union.t' => "Mouse accepts undefined type as a member of union types", @@ -25,7 +24,8 @@ my %SKIP_TEST = ( '602-mouse-tiny.t' => "Moose doesn't support ::Tiny", '603-mouse-pureperl.t'=> "Moose doesn't have ::PurePerl", - '031_roles_applied_in_create.t' => 't/lib/* classes are not Moose classes/roles', + '031_roles_applied_in_create.t' => 't/lib/*.pm are not for Moose', + '013_metaclass_traits.t' => 't/lib/*.pm are not for Moose', ); my @compat_tests; @@ -51,7 +51,7 @@ File::Find::find( my $dirname = File::Basename::dirname($_); - my $tmpdir = File::Spec->catfile('xt', 'compatibility', $dirname); + my $tmpdir = File::Spec->catfile('xt', 'compat', $dirname); File::Path::mkpath($tmpdir); my $tmpfile = File::Spec->catfile($tmpdir, $basename); @@ -65,6 +65,7 @@ File::Find::find( }; $src =~ s/Mouse::(?:Util::)?is_class_loaded/Class::MOP::is_class_loaded/g; $src =~ s/Mouse::(?:Util::)?load_class/Class::MOP::load_class/g; + $src =~ s/Mouse::Util::class_of/Class::MOP::class_of/g; $src =~ s/Mouse/Moose/g; $src; };