App-Alice

 view release on metacpan or  search on metacpan

t/04-irc.t  view on Meta::CPAN

$cl->send_cl(":nick!user\@host NICK nick2");
ok $irc->includes_nick("nick2"), "nick change";
ok !$irc->includes_nick("nick"), "old nick removed after nick change";

$cl->send_cl(":nick!user\@host PART #test");
ok !$irc->includes_nick("nick"), "nick gone after part";

# topic
is $window->topic->{string}, "no topic set", "default initial topic";

$cl->send_srv(TOPIC => "#test", "updated topic");
is $window->topic->{string}, "updated topic", "self topic change string";
is $window->topic->{author}, "tester", "self topic change author";

$cl->send_cl(":nick!user\@host TOPIC #test :another topic update");
is $window->topic->{string}, "another topic update", "external topic change string";
is $window->topic->{author}, "nick", "external topic change author";

# part channel
$cl->send_srv(PART => "#test");
ok !$app->find_window("#test", $irc), "part removes window";



( run in 0.337 second using v1.01-cache-2.11-cpan-05444aca049 )