blob: 67261e027a992e0908174aa37f3084808a8b15d4 [file] [log] [blame]
#!perl
use strict;
use lib qw(..);
use Test::More tests => 3;
use Tie::IxHash;
BEGIN {
use_ok "FlashVideo::RTMPDownloader";
}
my $r = FlashVideo::RTMPDownloader->new;
# Ensure ordering is consistent.
my %data;
tie %data, "Tie::IxHash",
verbose => undef, conn => [qw/O:1 NS:foo/], rtmp => "rtmp://blah";
is_deeply([$r->get_command(\%data)],
[qw{--verbose --conn O:1 --conn NS:foo --rtmp rtmp://blah}]);
is(join(" ", $r->get_command(\%data, 1)),
"--verbose --conn 'O:1' --conn 'NS:foo' --rtmp 'rtmp://blah'");