aboutsummaryrefslogtreecommitdiffstats
path: root/testing/lib/Test/Irssi/Driver.pm
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-02-26 00:37:11 +0000
committerTom Feist <shabble@metavore.org>2011-02-26 00:37:11 +0000
commitbf563d29e40e6bb6cb9732b4457e633468a8c6c2 (patch)
treefddb146dd73cf06f75d21801cd70d89a487dae7f /testing/lib/Test/Irssi/Driver.pm
parentadded T:I:T as the base object for creating tests with. (diff)
downloadirssi-scripts-bf563d29e40e6bb6cb9732b4457e633468a8c6c2.tar.gz
irssi-scripts-bf563d29e40e6bb6cb9732b4457e633468a8c6c2.zip
lots of work moving things around so it mostly works. Hooray
Diffstat (limited to '')
-rw-r--r--testing/lib/Test/Irssi/Driver.pm17
1 files changed, 12 insertions, 5 deletions
diff --git a/testing/lib/Test/Irssi/Driver.pm b/testing/lib/Test/Irssi/Driver.pm
index 9d39d44..7a20d91 100644
--- a/testing/lib/Test/Irssi/Driver.pm
+++ b/testing/lib/Test/Irssi/Driver.pm
@@ -130,9 +130,11 @@ sub setup {
{
_start => 'START',
_stop => 'STOP',
+ got_sigchld => 'CHILD',
+
got_terminal_stdin => 'terminal_stdin',
got_child_stdout => 'child_stdout',
- got_sigchld => 'CHILD',
+
got_delay => 'timer_expired',
create_delay => 'timer_created',
testing_ready => 'start_tests',
@@ -148,16 +150,21 @@ sub setup {
sub start_tests {
my ($self) = $_[OBJECT];
- $self->parent->api->run_test('test1');
+ $self->log("Starting to run tests");
+ $self->log("-" x 80);
+ $self->parent->run_tests();
}
sub timer_created {
- my ($heap, $kernel, $duration) = @_[HEAP, KERNEL, ARG0];
- $kernel->delay(got_delay => $duration, 0);
+ my ($self, $heap, $kernel, $duration) = @_[OBJECT, HEAP, KERNEL, ARG0];
+ $kernel->delay(got_delay => $duration);
+ $self->log("Timer created");
}
sub timer_expired {
- die "Timer Expired";
+ my ($self, $data) = @_[OBJECT,ARG0];
+ $self->log("Timeout invoking test again.");
+ $self->parent->active_test->resume_from_timer;
}
sub save_term_settings {