File: GstTagSetter.t

package info (click to toggle)
libgstreamer-perl 0.19-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 900 kB
  • ctags: 59
  • sloc: perl: 2,456; ansic: 32; makefile: 6
file content (30 lines) | stat: -rw-r--r-- 772 bytes parent folder | download | duplicates (2)
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
27
28
29
30
#!/usr/bin/perl
use strict;
use warnings;
use Test::More tests => 3;

# $Id$

use Glib qw(TRUE FALSE);
use GStreamer -init;

my $tagger = GStreamer::ElementFactory -> make(vorbisenc => "tagger");

SKIP: {
  skip "tagger tests -- vorbisenc not found", 3
    unless defined $tagger;

  isa_ok($tagger, "GStreamer::TagSetter");

  my $tags = { title => ["Urgs"], artist => [qw(Screw You)] };

  $tagger -> merge_tags($tags, "replace");
  $tagger -> add_tags("append",
                      title => "Urgs 2",
                      artist => "Screw You");

  is_deeply($tagger -> get_tag_list(), { title => ["Urgs", "Urgs 2"], artist => ["Screw", "You", "Screw You"] });

  $tagger -> set_tag_merge_mode("replace-all");
  is($tagger -> get_tag_merge_mode(), "replace-all");
}