aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lib/Test/Irssi.pm
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-02-21 06:07:22 +0000
committerTom Feist <shabble@metavore.org>2011-02-21 06:07:22 +0000
commit2dc34ae882623c06117a5fd63bb71dfdacf9c765 (patch)
tree52d8ad8de29ba763c29e2e7f5681e6fe7c1a9c55 /testing/lib/Test/Irssi.pm
parentadded a gitignore for generated stuff and other pointless cruft (diff)
downloadirssi-scripts-2dc34ae882623c06117a5fd63bb71dfdacf9c765.tar.gz
irssi-scripts-2dc34ae882623c06117a5fd63bb71dfdacf9c765.zip
mostly working except for callback handling. Removed original auto-testing
script. Started work on some more tests
Diffstat (limited to 'testing/lib/Test/Irssi.pm')
-rw-r--r--testing/lib/Test/Irssi.pm32
1 files changed, 22 insertions, 10 deletions
diff --git a/testing/lib/Test/Irssi.pm b/testing/lib/Test/Irssi.pm
index f4acb71..be87dcf 100644
--- a/testing/lib/Test/Irssi.pm
+++ b/testing/lib/Test/Irssi.pm
@@ -11,9 +11,11 @@ class Test::Irssi {
use Data::Dump;
use IO::File;
use Test::Irssi::Driver;
+ use Test::Irssi::Callbacks;
# requires the latest pre-release POE from
# https://github.com/rcaputo/poe until a new release is...released.
+ use lib $ENV{HOME} . "/projects/poe/lib";
use POE;
@@ -82,6 +84,24 @@ class Test::Irssi {
builder => '_build_driver',
);
+ has '_callbacks'
+ => (
+ is => 'ro',
+ isa => 'Test::Irssi::Callbacks',
+ required => 1,
+ lazy => 1,
+ builder => '_build_callback_obj',
+ );
+
+ method _build_callback_obj {
+ my $cbo = Test::Irssi::Callbacks->new(parent => $self);
+
+ $self->log("Going to register vt callbacks");
+ $cbo->register_vt_callbacks;
+
+ return $cbo;
+ }
+
method _build_driver {
my $drv = Test::Irssi::Driver->new(parent => $self);
return $drv;
@@ -97,13 +117,6 @@ class Test::Irssi {
$vt->option_set(LINEWRAP => 1);
$vt->option_set(LFTOCRLF => 1);
- # callbacks
- $vt->callback_set(OUTPUT => \&vt_output, undef);
- $vt->callback_set(ROWCHANGE => \&vt_rowchange, undef);
- $vt->callback_set(CLEAR => \&vt_clear, undef);
- $vt->callback_set(SCROLL_DOWN => \&vt_scr_dn, undef);
- $vt->callback_set(SCROLL_UP => \&vt_scr_up, undef);
- $vt->callback_set(GOTO => \&vt_goto, undef);
return $vt;
}
@@ -126,14 +139,13 @@ class Test::Irssi {
method run {
-
+ $self->_driver->setup();
+ $self->log("Driver setup complete");
### Start a session to encapsulate the previous features.
$poe_kernel->run();
}
}
-
-
__END__
=head1 NAME