blob: ad55df8ab3853cd4778d20c062aef0a5a8fa3628 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!perl -T
use strict;
use warnings;
use utf8;
use 5.006;
use English qw(-no_match_vars);
use File::Temp qw(tempfile);
use Test::More tests => 2;
use Music::Lyrics::LRC;
our $VERSION = '0.11';
my $lrc = Music::Lyrics::LRC->new();
$lrc->set_tag( 'foo', 'bar' );
$lrc->add_lyric( 0, 'lalala' );
$lrc->add_lyric( 10, 'doremi' );
my ( $fh, $fn ) = tempfile();
ok( $lrc->save($fh), 'save' );
close $fh
or die "$ERRNO\n";
ok( -s $fn == 44, 'length' ); ## no critic (ProhibitMagicNumbers)
|