diff options
author | richo <richo@psych0tik.net> | 2011-07-18 03:36:40 +0000 |
---|---|---|
committer | richo <richo@psych0tik.net> | 2011-07-18 03:36:40 +0000 |
commit | e4b9ea15d7abdae8211d18737fa54933f3faf57b (patch) | |
tree | fda4cc23faebfd1f130578b39fe161fe4c0ba1f8 /testing/t | |
parent | Added goodnicks from richoH/richos-irssi (diff) | |
parent | Only attempt join if channel exists (diff) | |
download | irssi-scripts-e4b9ea15d7abdae8211d18737fa54933f3faf57b.tar.gz irssi-scripts-e4b9ea15d7abdae8211d18737fa54933f3faf57b.zip |
Merge branch 'master' into richoH-dev
Diffstat (limited to 'testing/t')
-rwxr-xr-x | testing/t/001-use.t | 27 | ||||
-rwxr-xr-x | testing/t/002-init.t | 33 |
2 files changed, 60 insertions, 0 deletions
diff --git a/testing/t/001-use.t b/testing/t/001-use.t new file mode 100755 index 0000000..6ebbb5a --- /dev/null +++ b/testing/t/001-use.t @@ -0,0 +1,27 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use Test::More; +use Data::Dumper; + +BEGIN { + use_ok 'Test::Irssi'; +} + + +my $test = new_ok 'Test::Irssi', + [irssi_binary => 'null', irssi_homedir => 'null']; + +my @methods = qw/logfile terminal_height terminal_width irssi_homedir irssi_binary/; +can_ok($test, @methods); + +undef $test; + +done_testing; + +__END__ + + + diff --git a/testing/t/002-init.t b/testing/t/002-init.t new file mode 100755 index 0000000..b688f9f --- /dev/null +++ b/testing/t/002-init.t @@ -0,0 +1,33 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +use Test::More; +use Data::Dumper; + +BEGIN { + use_ok 'Test::Irssi'; +} + + +my $test = new_ok 'Test::Irssi', + [irssi_binary => "/opt/stow/repo/irssi-debug/bin/irssi", + irssi_homedir => $ENV{HOME} . "/projects/tmp/test/irssi-debug"]; + +if (-f $test->logfile) { + ok(unlink $test->logfile, 'deleted old logfile'); +} + +my $drv = $test->driver; +isa_ok($drv, 'Test::Irssi::Driver', 'driver created ok'); + +diag "Starting POE session"; +$test->run(); + +done_testing; + +__END__ + + + |