VideoLAN-LibVLC

 view release on metacpan or  search on metacpan

t/11-log.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Try::Tiny;
use Log::Any '$log';
use VideoLAN::LibVLC;
sub err(&) { my $code= shift; try { $code->(); '' } catch { "$_" }; }

plan skip_all => 'Log redirection not supported on this version of LibVLC'
	unless VideoLAN::LibVLC->can_redirect_log;

my $vlc= new_ok( 'VideoLAN::LibVLC', [], 'new instance, no args' );

is( err{ $vlc->log(undef) }, '', 'set log to undef when already undef' );

# TODO: find a way to reliably generate log output



( run in 1.645 second using v1.01-cache-2.11-cpan-49f99fa48dc )