File: link-base.t

package info (click to toggle)
libwww-mechanize-perl 1.12-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 476 kB
  • ctags: 109
  • sloc: perl: 2,214; makefile: 39
file content (20 lines) | stat: -rw-r--r-- 470 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
#!perl -Tw

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" );
}