aboutsummaryrefslogtreecommitdiffstats
path: root/testing/auto-testing.pl
diff options
context:
space:
mode:
authorTom Feist <shabble@metavore.org>2011-02-21 06:07:22 +0000
committerTom Feist <shabble@metavore.org>2011-02-21 06:07:22 +0000
commit2dc34ae882623c06117a5fd63bb71dfdacf9c765 (patch)
tree52d8ad8de29ba763c29e2e7f5681e6fe7c1a9c55 /testing/auto-testing.pl
parentadded a gitignore for generated stuff and other pointless cruft (diff)
downloadirssi-scripts-2dc34ae882623c06117a5fd63bb71dfdacf9c765.tar.gz
irssi-scripts-2dc34ae882623c06117a5fd63bb71dfdacf9c765.zip
mostly working except for callback handling. Removed original auto-testing
script. Started work on some more tests
Diffstat (limited to 'testing/auto-testing.pl')
-rwxr-xr-xtesting/auto-testing.pl95
1 files changed, 0 insertions, 95 deletions
diff --git a/testing/auto-testing.pl b/testing/auto-testing.pl
deleted file mode 100755
index 69a855e..0000000
--- a/testing/auto-testing.pl
+++ /dev/null
@@ -1,95 +0,0 @@
-
-
-#package Test::Irssi;
-
-use warnings;
-use strict;
-
-# for fixed version of P:W:R
-use lib $ENV{HOME} . "/projects/poe/lib";
-
-sub PROGRAM () { "/opt/stow/repo/irssi-debug/bin/irssi" }
-sub IRSSI_HOME () { $ENV{HOME} . "/projects/tmp/test/irssi-debug" }
-
-sub ROWS () { 24 }
-sub COLS () { 80 }
-
-use Term::VT102;
-use Term::TermInfo;
-use feature qw/say switch/;
-use Data::Dumper;
-use IO::File;
-
-my $logfile = "irssi.log";
-my $logfh = IO::File->new($logfile, 'w');
- die "Couldn't open $logfile for writing: $!" unless defined $logfh;
-
-$logfh->autoflush(1);
-
-
-my $ti = Term::Terminfo->new();
-my $vt = Term::VT102->new(rows => ROWS, cols => COLS);
-
-vt_configure_callbacks($vt);
-
-sub vt_output {
- my ($vt, $cb_name, $cb_data, $priv_data) = @_;
- say $logfh "OUTPUT: " . Dumper([@_[1..$#_]]);
-}
-
-
-sub vt_rowchange {
- my ($vt, $cb_name, $arg1, $arg2, $priv_data) = @_;
- #say $logfh "ROWCHANGE: " . Dumper(\@_);
- #say $logfh "Row $arg1 changed: ";
- #say $logfh $vt->row_plaintext($arg1);
- my $bottom_line = $vt->rows();
- say $logfh "-" x 100;
- say $logfh "Window Line";
- say $logfh $vt->row_plaintext($bottom_line - 1);
- say $logfh "-" x 100;
- say $logfh "Prompt line";
- say $logfh $vt->row_plaintext($bottom_line);
- say $logfh "-" x 100;
-
-
- # print $ti->getstr("clear");
- # print vt_dump();
-}
-
-sub vt_clear {
- my ($vt, $cb_name, $arg1, $arg2, $priv_data) = @_;
- say $logfh "VT Cleared";
-}
-sub vt_scr_dn {
- my ($vt, $cb_name, $arg1, $arg2, $priv_data) = @_;
- say $logfh "Scroll Down";
-}
-sub vt_scr_up {
- my ($vt, $cb_name, $arg1, $arg2, $priv_data) = @_;
- say $logfh "Scroll Up";
-}
-sub vt_goto {
- my ($vt, $cb_name, $arg1, $arg2, $priv_data) = @_;
- say $logfh "Goto: $arg1, $arg2";
-}
-
-sub vt_dump {
- my $str = '';
- for my $y (1..ROWS) {
- $str .= $vt->row_sgrtext($y) . "\n";
- }
- return $str;
-}
-
-
-
-
-
-
-sub vt_configure_callbacks {
- my ($vt) = @_;
-}
-
-### Start POE's main loop, which runs the session until it's done.
-exit 0;