From ec8db9ad0414fcf118a24fecc68f42fb18f50557 Mon Sep 17 00:00:00 2001 From: Tom Feist Date: Fri, 4 Mar 2011 02:03:26 +0000 Subject: Test::Irssi::Test - whitespace cleanup --- testing/lib/Test/Irssi/Test.pm | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) (limited to 'testing') diff --git a/testing/lib/Test/Irssi/Test.pm b/testing/lib/Test/Irssi/Test.pm index 7ee511f..9655ee4 100644 --- a/testing/lib/Test/Irssi/Test.pm +++ b/testing/lib/Test/Irssi/Test.pm @@ -31,39 +31,39 @@ class Test::Irssi::Test { has 'states' => ( - is => 'ro', - isa => 'ArrayRef', - traits => [qw/Array/], + is => 'ro', + isa => 'ArrayRef', + traits => [qw/Array/], default => sub { [] }, - lazy => 1, + lazy => 1, handles => { - add_state => 'push', + add_state => 'push', state_count => 'count', - get_state => 'get', + get_state => 'get', }, ); has 'results' => ( - is => 'ro', - isa => 'ArrayRef', + is => 'ro', + isa => 'ArrayRef', default => sub { [] }, ); has 'complete' => ( - is => 'rw', - isa => 'Bool', + is => 'rw', + isa => 'Bool', default => 0, ); has '_next_state' => ( - is => 'rw', - isa => 'Int', + is => 'rw', + isa => 'Int', default => 0, - traits => [qw/Counter/], + traits => [qw/Counter/], handles => { _increment_state_counter => 'inc', _clear_state => 'reset', @@ -112,6 +112,15 @@ class Test::Irssi::Test { $self->log("Adding $pattern as output match "); } + sub add_cursor_position_test { + my ($self, $x, $y, $desc) = @_; + $self->add_state({output => 1, + x => $x, + y => $y, + desc => $desc }); + $self->log("Adding cursor [$x, $y] test "); + + } sub add_evaluation_function { my ($self, $coderef, $desc) = @_; $self->add_state({code => $coderef, desc => $desc}); -- cgit v1.2.3