File: user_id.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 (31 lines) | stat: -rw-r--r-- 536 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
20
21
22
23
24
25
26
27
28
29
30
31
use strict;
use warnings;
use Test::More;
use WWW::YouTube::Download;

sub test_user_id {
    my ($input, $expects) = @_;
    is +WWW::YouTube::Download->new()->user_id($input), $expects;
}

test_user_id(
    'http://www.youtube.com/user/EpicStepsFromHell/videos?flow=list&view=0',
    'EpicStepsFromHell'
);

test_user_id(
    'http://www.youtube.com/user/ZackHemsey',
    'ZackHemsey'
);

test_user_id(
    'http://www.youtube.com/user/bsdconferences/',
    'bsdconferences'
);

test_user_id(
    'VEVO',
    'VEVO'
);

done_testing;