File: pnggen.t

package info (click to toggle)
libmedia-convert-perl 1.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,416 kB
  • sloc: perl: 1,886; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/perl -w

use strict;
use warnings;

use Test::More tests => 8;

use_ok("Media::Convert::Asset::PNGGen");
use_ok("Media::Convert::Asset");
use_ok("Media::Convert::Pipe");

my $input = Media::Convert::Asset::PNGGen->new(url => "t/testvids/m-c.png");
isa_ok($input, "Media::Convert::Asset");
isa_ok($input, "Media::Convert::Asset::PNGGen");
my $output = Media::Convert::Asset->new(url => "./test.mkv", duration => 5, video_framerate => 25);
isa_ok($output, "Media::Convert::Asset");

Media::Convert::Pipe->new(inputs => [$input], output => $output)->run;

my $check = Media::Convert::Asset->new(url => $output->url);

ok(int($check->duration) == 5, "The video is created with the correct length");
ok($check->astream_count == 1, "Exactly one audio stream is created");

unlink($output->url);