File: rtsp.t

package info (click to toggle)
liburi-perl 5.30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 948 kB
  • sloc: perl: 3,936; makefile: 4
file content (34 lines) | stat: -rw-r--r-- 651 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
31
32
33
34
use strict;
use warnings;

use Test::More tests => 9;

use URI ();

my $u = URI->new("<rtsp://media.example.com/fo.smi/>");

#print "$u\n";
is($u, "rtsp://media.example.com/f%F4o.smi/");

is($u->port, 554);

# play with port
my $old = $u->port(8554);
ok($old == 554 && $u eq "rtsp://media.example.com:8554/f%F4o.smi/");

$u->port(554);
is($u, "rtsp://media.example.com:554/f%F4o.smi/");

$u->port("");
ok($u eq "rtsp://media.example.com:/f%F4o.smi/" && $u->port == 554);

$u->port(undef);
is($u, "rtsp://media.example.com/f%F4o.smi/");

is($u->host, "media.example.com");

is($u->path, "/f%F4o.smi/");

$u->scheme("rtspu");
is($u->scheme, "rtspu");