diff options
author | Tom Feist <shabble@metavore.org> | 2011-03-04 02:03:26 +0000 |
---|---|---|
committer | Tom Feist <shabble@metavore.org> | 2011-03-04 02:03:26 +0000 |
commit | ec8db9ad0414fcf118a24fecc68f42fb18f50557 (patch) | |
tree | a7537a3718a397f571f01979f2edb98958d4d5ae | |
parent | readme: updated to give a brief description of the various bits of the repo. (diff) | |
download | irssi-scripts-ec8db9ad0414fcf118a24fecc68f42fb18f50557.tar.gz irssi-scripts-ec8db9ad0414fcf118a24fecc68f42fb18f50557.zip |
Test::Irssi::Test - whitespace cleanup
-rw-r--r-- | testing/lib/Test/Irssi/Test.pm | 35 |
1 files changed, 22 insertions, 13 deletions
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}); |