+2008-08-05 Jun Morimoto <morimoto@mrmt.net>
+
+ * t/*.t: added can_ok()
+
2008-08-03 Jun Morimoto <morimoto@mrmt.net>
* lib/plugins/00all: added follow_nick option
# -*- mode: perl; coding: utf-8 -*-
-# $Id: 02_ClientInfo.t,v 1.2 2008-08-03 04:38:26 morimoto Exp $
+# $Id: 02_ClientInfo.t,v 1.3 2008-08-05 14:08:25 morimoto Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/t/02_ClientInfo.t,v $
# Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
# This program is covered by the GNU General Public License 2
use strict;
use warnings;
-# use Test::More tests => 52;
use Test::More 'no_plan';
use FindBin;
use lib "$FindBin::Bin/../lib";
use_ok('Keitairc::ClientInfo');
}
+can_ok('Keitairc::ClientInfo',
+ qw/new user_agent is_ezweb is_docomo is_ipod is_softbank
+ is_emobile is_emobile_mobilebrowser is_emobile_openbrowser
+ is_mobile softbank_serial docomo_foma_icc docomo_imodeid
+ au_subscriber_id emobile_userid serial_key cookie_available/);
+
# au
{
my $header = new HTTP::Headers;
# -*- mode: perl; coding: utf-8 -*-
-# $Id: 02_Config.t,v 1.5 2008-08-03 13:33:40 morimoto Exp $
+# $Id: 02_Config.t,v 1.6 2008-08-05 14:08:25 morimoto Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/t/02_Config.t,v $
# Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
# This program is covered by the GNU General Public License 2
use Cwd;
use Keitairc::Log;
+can_ok('Keitairc::Config', qw/new file/);
+
my $version = '10.1';
my $c = new Keitairc::Config({
version => $version,
# -*- mode: perl; coding: utf-8 -*-
-# $Id: 02_IrcBuffer.t,v 1.1 2008-08-02 18:35:54 morimoto Exp $
+# $Id: 02_IrcBuffer.t,v 1.2 2008-08-05 14:08:25 morimoto Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/t/02_IrcBuffer.t,v $
# Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
# This program is covered by the GNU General Public License 2
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More 'no_plan';
use FindBin;
use lib "$FindBin::Bin/../lib";
use_ok('Keitairc::IrcBuffer');
}
-# TODO: write some test
+can_ok('Keitairc::IrcBuffer',
+ qw/new add_nick list_nick remove_nick get_nick_realname op_nick
+ deop_nick get_nick_op channels now name2cid cid2name part join
+ mtime unread_lines topic buffer_ptr add_message
+ compact_channel_name simple_escape colorize update_timestamp/);
+
+# TODO: write reasonable test
# -*- mode: perl; coding: utf-8 -*-
-# $Id: 02_IrcCallback.t,v 1.1 2008-08-02 18:35:54 morimoto Exp $
+# $Id: 02_IrcCallback.t,v 1.2 2008-08-05 14:08:25 morimoto Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/t/02_IrcCallback.t,v $
# Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
# This program is covered by the GNU General Public License 2
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More 'no_plan';
use FindBin;
use lib "$FindBin::Bin/../lib";
BEGIN {
use_ok('Keitairc::IrcCallback');
}
-# TODO: write some test
+can_ok('Keitairc::IrcCallback',
+ qw/irc_start irc_registered irc_001 irc_public irc_join
+ irc_part irc_quit irc_whoreply irc_mode irc_nick irc_notice
+ irc_topic irc_topicraw irc_msg irc_ctcp_action irc_reconnect
+ irc_connect irc_autoping/);
+
+# TODO: write reasonable test
# -*- mode: perl; coding: utf-8 -*-
-# $Id: 02_Log.t,v 1.1 2008-08-02 18:35:54 morimoto Exp $
+# $Id: 02_Log.t,v 1.2 2008-08-05 14:08:25 morimoto Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/t/02_Log.t,v $
# Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
# This program is covered by the GNU General Public License 2
BEGIN {
use_ok('Keitairc::Log');
}
+
+exit;
# -*- mode: perl; coding: utf-8 -*-
-# $Id: 02_Plugins.t,v 1.2 2008-08-03 04:38:26 morimoto Exp $
+# $Id: 02_Plugins.t,v 1.3 2008-08-05 14:08:25 morimoto Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/t/02_Plugins.t,v $
# Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
# This program is covered by the GNU General Public License 2
use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 6;
use FindBin;
use lib "$FindBin::Bin/../lib";
use_ok('Keitairc::Plugins');
}
+can_ok('Keitairc::Plugins',
+ qw/new list_plugins list_replace_plugins list_action_plugins
+ load_plugins/);
+
use Keitairc::Config;
use Keitairc::Log;
}
1;
}
+
+
# -*- mode: perl; coding: utf-8 -*-
-# $Id: 02_SessionManager.t,v 1.1 2008-08-02 18:35:54 morimoto Exp $
+# $Id: 02_SessionManager.t,v 1.2 2008-08-05 14:08:25 morimoto Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/t/02_SessionManager.t,v $
# Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
# This program is covered by the GNU General Public License 2
use strict;
use warnings;
use Data::Dumper;
-use Test::More tests => 31;
+use Test::More tests => 32;
use FindBin;
use lib "$FindBin::Bin/../lib";
use_ok('Keitairc::SessionManager');
}
+# dh() is not class method
+can_ok('Keitairc::SessionManager',
+ qw/new verify search_by_session_id search_by_serial_key refresh
+ add garbage_collect delete normalize_user_agent/);
+
# every serial strings are fictitious
my $foma_ua = 'DoCoMo/2.0 P703imyu(c100;TB;W30H15)';
my $foma_ua_icc = 'DoCoMo/2.0 P703imyu(c100;TB;W30H15;ser123498761234567;icc9876543210234567890F)';
# -*- mode: perl; coding: utf-8 -*-
-# $Id: 02_View.t,v 1.1 2008-08-02 18:35:54 morimoto Exp $
+# $Id: 02_View.t,v 1.2 2008-08-05 14:08:25 morimoto Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/t/02_View.t,v $
# Copyright (c) 2003-2008 Jun Morimoto <morimoto@mrmt.net>
# This program is covered by the GNU General Public License 2
use strict;
use warnings;
-use Test::More tests => 1;
+use Test::More tests => 2;
use FindBin;
use lib "$FindBin::Bin/../lib";
BEGIN {
use_ok('Keitairc::View');
}
-# TODO: write some test
+# timestamp() is not class method
+can_ok('Keitairc::View',
+ qw/new redirect template_path public_path template public
+ render/);
+
+# TODO: write reasonable test