From 5bb2c4214f48083eb896441fd22e18e38ef66da2 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 1 Mar 2011 02:43:37 +0100 Subject: vim-mode: Add irssi configuration directory used for testing. Contains default configuration with vim-mode statusbars. --- vim-mode/irssi/config | 38 ++++++++++++++++++++++++++++ vim-mode/irssi/scripts/autorun/uberprompt.pl | 1 + vim-mode/irssi/scripts/autorun/vim_mode.pl | 1 + 3 files changed, 40 insertions(+) create mode 100644 vim-mode/irssi/config create mode 120000 vim-mode/irssi/scripts/autorun/uberprompt.pl create mode 120000 vim-mode/irssi/scripts/autorun/vim_mode.pl (limited to 'vim-mode') diff --git a/vim-mode/irssi/config b/vim-mode/irssi/config new file mode 100644 index 0000000..d0b0805 --- /dev/null +++ b/vim-mode/irssi/config @@ -0,0 +1,38 @@ +# Minimal default irssi configuration file - with vim-mode statusbars. + + +servers = ( ); + +chatnets = { }; + +channels = ( ); + +aliases = { }; + +statusbar = { + default = { + window = { + items = { + barstart = { priority = "100"; }; + time = { }; + user = { }; + window = { }; + window_empty = { }; + lag = { priority = "-1"; }; + act = { priority = "10"; }; + more = { priority = "-1"; alignment = "right"; }; + barend = { priority = "100"; alignment = "right"; }; + vim_mode = { }; + vim_windows = { }; + }; + }; + + prompt = { + items = { + uberprompt = { priority = "-1"; }; + input = { priority = "10"; }; + }; + position = "100"; + }; + }; +}; diff --git a/vim-mode/irssi/scripts/autorun/uberprompt.pl b/vim-mode/irssi/scripts/autorun/uberprompt.pl new file mode 120000 index 0000000..3d4d97a --- /dev/null +++ b/vim-mode/irssi/scripts/autorun/uberprompt.pl @@ -0,0 +1 @@ +../../../../prompt_info/uberprompt.pl \ No newline at end of file diff --git a/vim-mode/irssi/scripts/autorun/vim_mode.pl b/vim-mode/irssi/scripts/autorun/vim_mode.pl new file mode 120000 index 0000000..ed78131 --- /dev/null +++ b/vim-mode/irssi/scripts/autorun/vim_mode.pl @@ -0,0 +1 @@ +../../../../vim-mode/vim_mode.pl \ No newline at end of file -- cgit v1.2.3 From 38b08f34d836a13f7ac9bbb5bdd516dd9d94fb5f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Tue, 1 Mar 2011 03:19:59 +0100 Subject: vim-mode: Add tests.pl. --- vim-mode/tests.pl | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 vim-mode/tests.pl (limited to 'vim-mode') diff --git a/vim-mode/tests.pl b/vim-mode/tests.pl new file mode 100644 index 0000000..2a85b29 --- /dev/null +++ b/vim-mode/tests.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl + +# Must be run in a 80x24 terminal unless a fixed POE is released. + + +use strict; +use warnings; + +use lib '../testing/blib/lib'; + +use Test::Irssi; + + +sub statusbar_mode { + my ($test, $mode) = @_; + + $test->add_pattern_match(qr/^ \[\d{2}:\d{2}\] \[\] \[1\] \[$mode\]\s+$/, + 'window_sbar', "[$mode] in vim-mode statusbar"); +} + +my $tester = Test::Irssi->new + (irssi_binary => "irssi", + irssi_homedir => "irssi"); + + +my $test; + + +$test = $tester->new_test('insert-command-mode'); + +# Make sure irssi is finished - not entirely sure why this is necessary. +$test->add_delay(3); + +# We start in insert mode. +statusbar_mode($test, 'Insert'); + +$test->add_input_sequence("\e"); +$test->add_delay(1); +statusbar_mode($test, 'Command'); + +$test->add_input_sequence("i"); +$test->add_delay(1); +statusbar_mode($test, 'Insert'); + +# Quit irssi, necessary to terminate the test. +$test->add_input_sequence("\n/quit\n"); + +$tester->run; -- cgit v1.2.3