You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
600 B

use strict;
use warnings;
use Test::More tests => 6;
require_ok('Subtitle::Format');
{
package Subtitle::Dummy;
use strict;
use warnings;
use base 'Subtitle::Format';
sub new {
my $class = shift;
my $self = { log => [] };
return bless ($self, $class);
};
1;
}
my $obj = Subtitle::Dummy->new;
isa_ok($obj, 'Subtitle::Dummy');
can_ok($obj, qw(new parse build log events sort_events
from_file to_file from_string to_string));
is(scalar @{ $obj->{log} }, 0);
$obj->log(warn => "something");
is(scalar @{ $obj->{log} }, 1);
is($obj->{log}->[0], 'W: something');
exit 0;