use Test::More tests => 8;
use MojoMojo::Formatter::IRCLog;
my $content;
my $ib = "\n=irc\n";
my $ie = "\n=irc\n";
my $ob = "\n==\n
\n";
my $oe = "
\n==\n";
$content = "${ib} text$ie";
MojoMojo::Formatter::IRCLog->format_content(\$content);
is($content, "$ob[[nick]]\ntext\n$oe", "basic");
$content = "${ib}12:00 text$ie";
MojoMojo::Formatter::IRCLog->format_content(\$content);
is($content, "$ob[[nick]]\ntext\n$oe", "with timestamp");
$content = "${ib}12:00 < nick> text$ie";
MojoMojo::Formatter::IRCLog->format_content(\$content);
is($content, "$ob[[nick]]\ntext\n$oe", "with space");
$content = "${ib}12:00 <\@nick> text$ie";
MojoMojo::Formatter::IRCLog->format_content(\$content);
is($content, "$ob[[nick]]\ntext\n$oe", "op");
$content = "${ib}12:00 <%nick> text$ie";
MojoMojo::Formatter::IRCLog->format_content(\$content);
is($content, "$ob[[nick]]\ntext\n$oe", "half-op");
$content = "${ib}12:00 <+nick> text$ie";
MojoMojo::Formatter::IRCLog->format_content(\$content);
is($content, "$ob[[nick]]\ntext\n$oe", "voice");
$content = "${ib}12:00 <+nick> text\nmore$ie";
MojoMojo::Formatter::IRCLog->format_content(\$content);
is($content, "$ob[[nick]]\ntext more\n$oe", "multi-line");
$content = "${ib}12:00 <+nick> text\nmore$ie${ib}12:00 <+nick> text\nmore$ie";
MojoMojo::Formatter::IRCLog->format_content(\$content);
is($content, "$ob[[nick]]\ntext more\n$oe$ob[[nick]]\ntext more\n$oe", "multi-block");