|
Revision 5980, 0.6 kB
(checked in by tokuhirom, 5 years ago)
|
|
merge
|
| Line | |
|---|
| 1 | use strict; |
|---|
| 2 | use warnings; |
|---|
| 3 | use Data::Dumper; |
|---|
| 4 | use App::Mobirc::Plugin::MessageBodyFilter::IRCColor; |
|---|
| 5 | |
|---|
| 6 | use Test::Base; |
|---|
| 7 | eval q{ use String::IRC }; |
|---|
| 8 | plan skip_all => "String::IRC is not installed." if $@; |
|---|
| 9 | |
|---|
| 10 | filters { |
|---|
| 11 | input => ['eval', 'decorate_irc_color'], |
|---|
| 12 | }; |
|---|
| 13 | |
|---|
| 14 | sub decorate_irc_color { |
|---|
| 15 | my $x = shift; |
|---|
| 16 | App::Mobirc::Plugin::MessageBodyFilter::IRCColor::process( $x, {no_decorate => 1} ); |
|---|
| 17 | } |
|---|
| 18 | |
|---|
| 19 | run_is input => 'expected'; |
|---|
| 20 | |
|---|
| 21 | __END__ |
|---|
| 22 | |
|---|
| 23 | === |
|---|
| 24 | --- input: String::IRC->new('world')->yellow('green') |
|---|
| 25 | --- expected: world |
|---|
| 26 | |
|---|
| 27 | === |
|---|
| 28 | --- input: String::IRC->new('world')->red('green') |
|---|
| 29 | --- expected: world |
|---|
| 30 | |
|---|