|
Revision 10701, 449 bytes
(checked in by hirose31, 5 years ago)
|
|
impo
|
| Line | |
|---|
| 1 | # -*- mode: cperl; -*- |
|---|
| 2 | use Test::Base; |
|---|
| 3 | use String::IRC; |
|---|
| 4 | |
|---|
| 5 | plan tests => 1 * blocks; |
|---|
| 6 | |
|---|
| 7 | run { |
|---|
| 8 | my $block = shift; |
|---|
| 9 | my $x = String::IRC->new( $block->input ); |
|---|
| 10 | |
|---|
| 11 | my ($fg, $bg) = split /\s+/, $block->name; |
|---|
| 12 | $x->$fg($bg); |
|---|
| 13 | |
|---|
| 14 | is "$x", $block->expect, $block->name; |
|---|
| 15 | }; |
|---|
| 16 | |
|---|
| 17 | __END__ |
|---|
| 18 | === yellow red |
|---|
| 19 | --- input: hello |
|---|
| 20 | --- expect: 8,4hello |
|---|
| 21 | === red yellow |
|---|
| 22 | --- input: hello |
|---|
| 23 | --- expect: 4,8hello |
|---|
| 24 | === red cyan |
|---|
| 25 | --- input: hello |
|---|
| 26 | --- expect: 4,11hello |
|---|