aboutsummaryrefslogtreecommitdiffstats
path: root/feature-tests/format-test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'feature-tests/format-test.pl')
-rw-r--r--feature-tests/format-test.pl13
1 files changed, 9 insertions, 4 deletions
diff --git a/feature-tests/format-test.pl b/feature-tests/format-test.pl
index 2c99d50..7a38d9f 100644
--- a/feature-tests/format-test.pl
+++ b/feature-tests/format-test.pl
@@ -3,7 +3,7 @@ use warnings;
use Irssi;
-
+use Data::Dumper;
our $VERSION = '0.1';
our %IRSSI = (
@@ -16,19 +16,24 @@ our %IRSSI = (
sub actually_printformat {
my ($win, $level, $module, $format, @args) = @_;
+ my $ret = '';
{
# deeeeeeep black magic.
local *CORE::GLOBAL::caller = sub { $module };
$win->printformat($level, $format, @args);
- }
+ $ret = Irssi::current_theme()->get_format($module, $format);
+ }
+ return $ret;
}
init();
sub init {
my $win = Irssi::active_win();
- actually_printformat($win, Irssi::MSGLEVEL_CLIENTCRAP, 'fe-common/irc',
- "kill_server", "foo", "bar", "horse", "cake");
+ my $moo = actually_printformat($win, Irssi::MSGLEVEL_CLIENTCRAP, 'fe-common/irc',
+ "kill_server", "foo", "bar", "horse", "cake");
+
+ print Dumper($moo);
}