File: link-base.t

package info (click to toggle)
libwww-mechanize-perl 2.03-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 988 kB
  • sloc: perl: 4,088; makefile: 6
file content (20 lines) | stat: -rw-r--r-- 469 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!perl -T

use warnings;
use strict;

use Test::More tests => 5;

BEGIN {
    use_ok( 'WWW::Mechanize::Link' );
}

NO_BASE: {
    my $link = WWW::Mechanize::Link->new( 'url.html', 'Click here', undef, undef );
    isa_ok( $link, 'WWW::Mechanize::Link', 'constructor OK' );

    my $URI = $link->URI;
    isa_ok( $URI, 'URI::URL', 'URI is proper type' );
    is( $URI->rel, 'url.html', 'Short form of the url' );
    is( $link->url_abs, 'url.html', 'url_abs works' );
}