MIME-Expander
view release on metacpan or search on metacpan
t/10_expander.t view on Meta::CPAN
'MIME::Expander::Plugin::ApplicationTar', 'plugin_for enabled plugin');
}
# regulate_type (class method)
{;
is( MIME::Expander->regulate_type('text/plain'), 'text/plain', 'regulate_type normal');
is( MIME::Expander->regulate_type('text/x-me'), 'text/me', 'regulate_type unregistered');
is( MIME::Expander->regulate_type('x-media/x-type'), 'media/type', 'regulate_type unregistered');
is( MIME::Expander->regulate_type(), undef, 'regulate_type undef');
is( MIME::Expander->regulate_type('a'), undef, 'regulate_type invalid');
is( MIME::Expander->regulate_type('text/plain; charset=UTF-8'), 'text/plain', 'regulate_type content-type');
}
# regulate_type (via instance)
{;
my $me = MIME::Expander->new;
is( $me->regulate_type('text/plain'), 'text/plain', 'regulate_type normal');
is( $me->regulate_type('text/x-me'), 'text/me', 'regulate_type unregistered');
is( $me->regulate_type('x-media/x-type'), 'media/type', 'regulate_type unregistered');
is( $me->regulate_type(), undef, 'regulate_type undef');
is( $me->regulate_type('a'), undef, 'regulate_type invalid');
is( $me->regulate_type('text/plain; charset=UTF-8'), 'text/plain', 'regulate_type content-type');
}
# walk
# => 11_expander_walk.t
__END__
( run in 1.497 second using v1.01-cache-2.11-cpan-524268b4103 )