mirror of
https://github.com/fmang/opustags.git
synced 2025-01-16 05:03:13 +01:00
t: read tags from a file
This commit is contained in:
parent
2181f9f0eb
commit
63fce2f555
BIN
t/gobble.opus
Normal file
BIN
t/gobble.opus
Normal file
Binary file not shown.
18
t/tags.t
Normal file
18
t/tags.t
Normal file
@ -0,0 +1,18 @@
|
||||
# Test the main features of opustags on an Ogg Opus sample file.
|
||||
|
||||
use Test::More tests => 2;
|
||||
|
||||
use Digest::MD5;
|
||||
|
||||
sub md5 {
|
||||
my ($file) = @_;
|
||||
open(my $fh, '<', $file) or return;
|
||||
my $ctx = Digest::MD5->new;
|
||||
$ctx->addfile($fh);
|
||||
$ctx->hexdigest
|
||||
}
|
||||
|
||||
is(md5('t/gobble.opus'), '111a483596ac32352fbce4d14d16abd2', 'the sample is the one we expect');
|
||||
is(`./opustags t/gobble.opus`, <<'EOF', 'read the initial tags');
|
||||
encoder=Lavc58.18.100 libopus
|
||||
EOF
|
Loading…
x
Reference in New Issue
Block a user