File: video_user.t

package info (click to toggle)
libwww-youtube-download-perl 0.65%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 348 kB
  • sloc: perl: 1,113; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 364 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;
use Test::More;
use WWW::YouTube::Download;

my $wyd = WWW::YouTube::Download->new;

sub test_video_user {
    my ($content, $expects) = @_;
    my $user = $wyd->_fetch_user($content);
    is $user, $expects;
}

test_video_user(
    '<span class="yt-user-name " dir="ltr">GoogleTechTalks</span>',
    'GoogleTechTalks',
);

done_testing;