use strict; use Test::Base; use HTML::MobileJp::Filter; use HTTP::MobileAgent; plan tests => 1 * blocks; filters { user_agent => [qw/ chomp /], config => [qw/ yaml /], input => [qw/ chomp /], expected => [qw/ chomp /], }; run { my $block = shift; my $filter = HTML::MobileJp::Filter->new($block->config); my $html = $filter->filter( mobile_agent => HTTP::MobileAgent->new($block->user_agent), html => $block->input, ); is($html, $block->expected, $block->name); }; __DATA__ === DoCoMoCSS and DoCoMoGUID --- user_agent DoCoMo/1.0/D501i --- config filters: - module: DoCoMoCSS config: base_dir: t/ - module: DoCoMoGUID --- input foo
bar
--- expected foo
bar