diff options
| -rw-r--r-- | feature-tests/format-test.pl | 18 | 
1 files changed, 13 insertions, 5 deletions
| diff --git a/feature-tests/format-test.pl b/feature-tests/format-test.pl index d8be412..2c99d50 100644 --- a/feature-tests/format-test.pl +++ b/feature-tests/format-test.pl @@ -14,13 +14,21 @@ our %IRSSI = (                license     => 'Public Domain',               ); -init(); +sub actually_printformat { +    my ($win, $level, $module, $format, @args) = @_; +    { +        # deeeeeeep black magic. +        local *CORE::GLOBAL::caller = sub { $module }; +        $win->printformat($level, $format, @args); +    } -sub init { -    Irssi::command_bind('ft', \&format_test);  } +init(); + +sub init { +    my $win = Irssi::active_win(); +    actually_printformat($win, Irssi::MSGLEVEL_CLIENTCRAP, 'fe-common/irc', +                               "kill_server", "foo", "bar", "horse", "cake"); -sub format_test { -    my ($args, $win, $server) = @_;  } | 
