aboutsummaryrefslogtreecommitdiffstats
path: root/testing/test.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-02-24 01:59:38 +0000
committerTom Feist <shabble@metavore.org>2011-02-24 01:59:38 +0000
commit754328bfe7acbc9409fd4d38340d76aabf96845c (patch)
tree8f8ec9ab17dce112c9b3e4f0c8a24ba45ffc2d2c /testing/test.pl
parentadded test and launcher script (diff)
downloadirssi-scripts-754328bfe7acbc9409fd4d38340d76aabf96845c.tar.gz
irssi-scripts-754328bfe7acbc9409fd4d38340d76aabf96845c.zip
more work on testing system for irssi. Most of the screenscraping now works,
trying to finalise an API for actual testing usage.
Diffstat (limited to '')
-rwxr-xr-xtesting/test.pl9
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/test.pl b/testing/test.pl
index b062160..5d2c1dd 100755
--- a/testing/test.pl
+++ b/testing/test.pl
@@ -8,6 +8,7 @@ use feature qw/say/;
use lib 'blib/lib';
use Test::Irssi;
+use Test::Irssi::API;
my $test = Test::Irssi->new
(irssi_binary => "/opt/stow/repo/irssi-debug/bin/irssi",
@@ -15,4 +16,12 @@ my $test = Test::Irssi->new
say "Created test instance";
+my $api = $test->api;
+
+$api->create_test('test1', 'bacon');
+$api->simulate_input("test1", "/echo This is a test\n");
+$api->simulate_delay("test1", 0.5);
+$api->expect_output("test1", qr/is a test/);
+
+$api->run_tests;
$test->run;