aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rwxr-xr-xtesting/t/002-init.t33
-rwxr-xr-xtesting/test.pl18
2 files changed, 51 insertions, 0 deletions
diff --git a/testing/t/002-init.t b/testing/t/002-init.t
new file mode 100755
index 0000000..df61e1e
--- /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__
+
+
+
diff --git a/testing/test.pl b/testing/test.pl
new file mode 100755
index 0000000..b062160
--- /dev/null
+++ b/testing/test.pl
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use feature qw/say/;
+
+use lib 'blib/lib';
+
+use Test::Irssi;
+
+my $test = Test::Irssi->new
+ (irssi_binary => "/opt/stow/repo/irssi-debug/bin/irssi",
+ irssi_homedir => $ENV{HOME} . "/projects/tmp/test/irssi-debug");
+
+say "Created test instance";
+
+$test->run;