aboutsummaryrefslogtreecommitdiffstats
path: root/testing/t
diff options
context:
space:
mode:
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;