Index: lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/decorate-irc-color.t
===================================================================
--- lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/decorate-irc-color.t (revision 13231)
+++ lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/decorate-irc-color.t (revision 13231)
@@ -0,0 +1,51 @@
+use strict;
+use warnings;
+use Data::Dumper;
+use App::Mobirc;
+
+use Test::Base;
+eval q{ use String::IRC };
+plan skip_all => "String::IRC is not installed." if $@;
+
+my $global_context = App::Mobirc->new(
+    {
+        httpd  => { lines => 40 },
+        global => { keywords => [qw/foo/] }
+    }
+);
+$global_context->load_plugin( { module => 'MessageBodyFilter::IRCColor', config => { no_decorate => 0} } );
+
+filters {
+    input => ['eval', 'decorate_irc_color'],
+};
+
+sub decorate_irc_color {
+    my $x = shift;
+    ($x,) = $global_context->run_hook_filter('message_body_filter', $x);
+    return $x;
+}
+
+run_is input => 'expected';
+
+__END__
+
+===
+--- input: String::IRC->new('world')->yellow('green')
+--- expected: <span style="color:yellow;background-color:green;">world</span>
+
+===
+--- input: String::IRC->new('world')->red('green')
+--- expected: <span style="color:red;background-color:green;">world</span>
+
+===
+--- input: String::IRC->new('world')->red('green')->bold;
+--- expected: <span style="font-weight:bold;color:red;background-color:green;">world</span>
+
+=== inverse is nop.because, html cannot use inverse.
+--- input: String::IRC->new('world')->inverse
+--- expected: world
+
+===
+--- input: String::IRC->new('world')->underline
+--- expected: <span style="text-decoration:underline;">world</span>
+
Index: lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/no-decorate-irc-color.t
===================================================================
--- lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/no-decorate-irc-color.t (revision 13231)
+++ lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/no-decorate-irc-color.t (revision 13231)
@@ -0,0 +1,38 @@
+use strict;
+use warnings;
+use App::Mobirc;
+
+use Test::Base;
+eval q{ use String::IRC };
+plan skip_all => "String::IRC is not installed." if $@;
+
+my $global_context = App::Mobirc->new(
+    {
+        httpd  => { lines => 40 },
+        global => { keywords => [qw/foo/] }
+    }
+);
+$global_context->load_plugin( { module => 'MessageBodyFilter::IRCColor', config => { no_decorate => 1} } );
+
+filters {
+    input => ['eval', 'decorate_irc_color'],
+};
+
+sub decorate_irc_color {
+    my $x = shift;
+    ($x,) = $global_context->run_hook_filter('message_body_filter', $x);
+    return $x;
+}
+
+run_is input => 'expected';
+
+__END__
+
+===
+--- input: String::IRC->new('world')->yellow('green')
+--- expected: world
+
+===
+--- input: String::IRC->new('world')->red('green')
+--- expected: world
+
Index: lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/clickable.t
===================================================================
--- lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/clickable.t (revision 13231)
+++ lang/perl/mobirc/trunk/t/Plugins/MessageBodyFilter/clickable.t (revision 13231)
@@ -0,0 +1,112 @@
+use strict;
+use warnings;
+use Test::Base;
+use App::Mobirc;
+
+plan tests => 1*blocks;
+
+filters {
+    input => ['yaml', 'clickable' ]
+};
+
+sub clickable {
+    my $x = shift;
+    my $global_context = App::Mobirc->new(
+        {
+            httpd  => { lines => 40 },
+            global => { keywords => [qw/foo/] }
+        }
+    );
+    $global_context->load_plugin( { module => 'MessageBodyFilter::Clickable', config => $x->{conf} } );
+    my ($res, ) = $global_context->run_hook_filter('message_body_filter', $x->{text});
+    $res;
+}
+
+run_is input => 'expected';
+
+__END__
+
+=== basic
+--- input
+text: http://d.hatena.ne.jp/
+conf: ~
+--- expected: <a href="http://d.hatena.ne.jp/" rel="nofollow" class="url">http://d.hatena.ne.jp/</a>
+
+=== basic with amp
+--- input
+text: http://www.google.co.jp/search?hl=ja&q=foo
+conf: ~
+--- expected: <a href="http://www.google.co.jp/search?hl=ja&amp;q=foo" rel="nofollow" class="url">http://www.google.co.jp/search?hl=ja&amp;q=foo</a>
+
+=== basic scheme restrict
+--- input
+text: http://d.hatena.ne.jp/
+conf:
+  accept_schemes: [mailto]
+--- expected: http://d.hatena.ne.jp/
+
+=== basic with http_link_string
+--- input
+text: http://d.hatena.ne.jp/hatenachan/
+conf:
+  http_link_string: $host$path
+--- expected: <a href="http://d.hatena.ne.jp/hatenachan/" rel="nofollow" class="url">d.hatena.ne.jp/hatenachan/</a>
+
+=== tel
+--- input
+text: 000-0000-0000
+conf: ~
+--- expected: <a href="tel:00000000000" rel="nofollow" class="url">000-0000-0000</a>
+
+=== tel with scheme
+--- input
+text: tel:000-0000-0000
+conf: ~
+--- expected: <a href="tel:00000000000" rel="nofollow" class="url">tel:000-0000-0000</a>
+
+=== mailto
+--- input
+text: aaa@example.com
+conf: ~
+--- expected: <a href="mailto:aaa@example.com" rel="nofollow" class="url">aaa@example.com</a>
+
+=== mailto with scheme
+--- input
+text: mailto:aaa@example.com
+conf: ~
+--- expected: <a href="mailto:aaa@example.com" rel="nofollow" class="url">mailto:aaa@example.com</a>
+
+=== mailto
+--- input
+text: <aaa@example.com>
+conf: ~
+--- expected: <a href="mailto:aaa@example.com" rel="nofollow" class="url">&lt;mailto:aaa@example.com&gt;</a>
+
+=== pocket hatena
+--- input
+text: http://d.hatena.ne.jp/
+conf:
+  pocket_hatena: 1
+--- expected: <a href="http://d.hatena.ne.jp/" rel="nofollow" class="url">http://d.hatena.ne.jp/</a><a href="http://mgw.hatena.ne.jp/?url=http%3A%2F%2Fd.hatena.ne.jp%2F;noimage=0;split=1" rel="nofollow" class="pocket_hatena">[ph]</a>
+
+=== au_pcsv
+--- input
+text: http://d.hatena.ne.jp/
+conf:
+  au_pcsv: 1
+--- expected: <a href="http://d.hatena.ne.jp/" rel="nofollow" class="url">http://d.hatena.ne.jp/</a><a href="device:pcsiteviewer?url=http://d.hatena.ne.jp/" rel="nofollow" class="au_pcsv">[PCSV]</a>
+
+=== au_pcsv with amp
+--- input
+text: http://www.google.co.jp/search?hl=ja&q=foo
+conf:
+  au_pcsv: 1
+--- expected: <a href="http://www.google.co.jp/search?hl=ja&amp;q=foo" rel="nofollow" class="url">http://www.google.co.jp/search?hl=ja&amp;q=foo</a><a href="device:pcsiteviewer?url=http://www.google.co.jp/search?hl=ja&amp;q=foo" rel="nofollow" class="au_pcsv">[PCSV]</a>
+
+=== google_gwt
+--- input
+text: http://d.hatena.ne.jp/
+conf:
+  google_gwt: 1
+--- expected: <a href="http://d.hatena.ne.jp/" rel="nofollow" class="url">http://d.hatena.ne.jp/</a><a href="http://www.google.co.jp/gwt/n?u=http%3A%2F%2Fd.hatena.ne.jp%2F;_gwt_noimg=0" rel="nofollow" class="google_gwt">[gwt]</a>
+
