File: script.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 (26 lines) | stat: -rw-r--r-- 617 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
26
#!/usr/bin/perl -w

use v5.24;

use Test::More;

use feature "signatures";
no warnings "experimental::signatures";

my $scriptpath;

if(-f "/usr/bin/mc-encode") {
	$scriptpath = "/usr/bin";
} else {
	$scriptpath = "./scripts";
}

sub run (@command) { ## no critic(ProhibitSubroutinePrototypes)
	print "running: '", join("' '", @command), "'\n";
	system(@command) == 0 or die "system @command failed: $?";
}

run("perl", "-I", $INC[0], "$scriptpath/mc-encode", "--input", "t/testvids/bbb.mp4", "--output", "bbb.webm", "--multipass", "--profile", "webm");
ok(-f "bbb.webm", "mc-encode creates a video");

done_testing;