diff options
author | James Raspass <jraspass@gmail.com> | 2022-08-21 20:48:21 +0100 |
---|---|---|
committer | Olaf Alders <olaf@wundersolutions.com> | 2022-08-22 08:26:51 -0400 |
commit | d58d34967abc31ad7d22a71aa5e15d407d77799a (patch) | |
tree | 68fb1ea013aa4f496a9267260e38b533146572c6 /t/rtsp.t | |
parent | 9cc1f62cb927c7a022f3f3b0d30c6e3f9a06a924 (diff) | |
download | uri-d58d34967abc31ad7d22a71aa5e15d407d77799a.tar.gz |
Replace raw TAP printing with "Test::More"
Diffstat (limited to 't/rtsp.t')
-rw-r--r-- | t/rtsp.t | 29 |
1 files changed, 10 insertions, 19 deletions
@@ -1,43 +1,34 @@ use strict; use warnings; -print "1..9\n"; +use Test::More tests => 9; use URI (); my $u = URI->new("<rtsp://media.example.com/fôo.smi/>"); #print "$u\n"; -print "not " unless $u eq "rtsp://media.example.com/f%F4o.smi/"; -print "ok 1\n"; +is($u, "rtsp://media.example.com/f%F4o.smi/"); -print "not " unless $u->port == 554; -print "ok 2\n"; +is($u->port, 554); # play with port my $old = $u->port(8554); -print "not " unless $old == 554 && $u eq "rtsp://media.example.com:8554/f%F4o.smi/"; -print "ok 3\n"; +ok($old == 554 && $u eq "rtsp://media.example.com:8554/f%F4o.smi/"); $u->port(554); -print "not " unless $u eq "rtsp://media.example.com:554/f%F4o.smi/"; -print "ok 4\n"; +is($u, "rtsp://media.example.com:554/f%F4o.smi/"); $u->port(""); -print "not " unless $u eq "rtsp://media.example.com:/f%F4o.smi/" && $u->port == 554; -print "ok 5\n"; +ok($u eq "rtsp://media.example.com:/f%F4o.smi/" && $u->port == 554); $u->port(undef); -print "not " unless $u eq "rtsp://media.example.com/f%F4o.smi/"; -print "ok 6\n"; +is($u, "rtsp://media.example.com/f%F4o.smi/"); -print "not " unless $u->host eq "media.example.com"; -print "ok 7\n"; +is($u->host, "media.example.com"); -print "not " unless $u->path eq "/f%F4o.smi/"; -print "ok 8\n"; +is($u->path, "/f%F4o.smi/"); $u->scheme("rtspu"); -print "not " unless $u->scheme eq "rtspu"; -print "ok 9\n"; +is($u->scheme, "rtspu"); |