File: link-base.t

package info (click to toggle)
libwww-mechanize-perl 1.73-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 668 kB
  • ctags: 143
  • sloc: perl: 3,360; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 470 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
#!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' );
}