aboutsummaryrefslogtreecommitdiffstats
path: root/testing/test.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-02-26 00:37:11 +0000
committerTom Feist <shabble@metavore.org>2011-02-26 00:37:11 +0000
commitbf563d29e40e6bb6cb9732b4457e633468a8c6c2 (patch)
treefddb146dd73cf06f75d21801cd70d89a487dae7f /testing/test.pl
parentadded T:I:T as the base object for creating tests with. (diff)
downloadirssi-scripts-bf563d29e40e6bb6cb9732b4457e633468a8c6c2.tar.gz
irssi-scripts-bf563d29e40e6bb6cb9732b4457e633468a8c6c2.zip
lots of work moving things around so it mostly works. Hooray
Diffstat (limited to '')
-rwxr-xr-xtesting/test.pl30
1 files changed, 21 insertions, 9 deletions
diff --git a/testing/test.pl b/testing/test.pl
index 5d2c1dd..3940116 100755
--- a/testing/test.pl
+++ b/testing/test.pl
@@ -8,20 +8,32 @@ use feature qw/say/;
use lib 'blib/lib';
use Test::Irssi;
-use Test::Irssi::API;
-my $test = Test::Irssi->new
+my $tester = 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";
-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;
+my $test = $tester->new_test('test1');
+
+$test->add_input_sequence("/echo Hello\n");
+$test->add_delay(2);
+$test->add_input_sequence("/echo Hello Again\n");
+for (1..10) {
+ $test->add_input_sequence($_);
+ $test->add_delay(0.2);
+}
+
+#$test->add_input_sequence("This is\x0acursor movement\x0a");
+# $test->add_delay(5);
+ $test->add_input_sequence("\n");
+
+ $test->add_input_sequence("/clear\n");
+# $test->add_expected_output("Hello");
+
+
+
+$tester->run;