Bump version and update Changes
[poe-component-irc-plugin-logger-irssi.git] / t / POE-Component-IRC-Plugin-Logger-Irssi.t
1 #!/usr/bin/perl
2 use v5.14;
3 use strict;
4 use warnings;
5
6 use Test::More tests => 14;
7 BEGIN { use_ok('POE::Component::IRC::Plugin::Logger::Irssi', 'irssi_format') };
8
9 my $fmt = irssi_format;
10 my $localtime0 = localtime 0;
11 is $fmt->{'+b'}->('mgv', '*!root@*'), '-!- mode [+b *!root@*] by mgv', 'mode +b';
12 is $fmt->{nick_change}->('mgv', 'arachnidsGrip'), '-!- mgv is now known as arachnidsGrip', 'change nick';
13 is $fmt->{topic_is}->('#chan', 'wasting time'), '-!- Topic for #chan: wasting time', 'see topic';
14 is $fmt->{topic_change}->('mgv', 'doing nothing'), '-!- mgv changed the topic to: doing nothing', 'set topic';
15 is $fmt->{topic_change}->('mgv', ''), '-!- Topic unset by mgv', 'unset topic';
16 is $fmt->{privmsg}->('mgv', 'Hello, world!'), '<mgv> Hello, world!', 'privmsg';
17 is $fmt->{notice}->('mgv', 'Hello, world!'), '-mgv- Hello, world!', 'notice';
18 is $fmt->{action}->('mgv', 'says hello'), '* mgv says hello', 'action';
19 is $fmt->{join}->('mgv', 'marius@example.org', '#chan'), '-!- mgv [marius@example.org] has joined #chan', 'join';
20 is $fmt->{part}->('mgv', 'marius@example.org', '#chan', 'bye'), '-!- mgv [marius@example.org] has left #chan [bye]', 'part';
21 is $fmt->{quit}->('mgv', 'marius@example.org', 'buh-bye'), '-!- mgv [marius@example.org] has quit [buh-bye]', 'quit';
22 is $fmt->{kick}->('mgv', 'troll', '#chan', 'trolling'), '-!- troll was kicked from #chan by mgv [trolling]', 'kick';
23 is $fmt->{topic_set_by}->('#chan', 'mgv', 0), "-!- Topic set by mgv [$localtime0]";
This page took 0.026227 seconds and 4 git commands to generate.