File: warnings.t

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

use warnings;
use strict;

use Test::More;
use Test::Warnings qw( :all );
use WWW::Mechanize ();

UNKNOWN_ALIAS: {
    my $m = WWW::Mechanize->new;
    isa_ok( $m, 'WWW::Mechanize' );

    like warning {
        $m->agent_alias('Blongo');
    }, qr/\AUnknown agent alias "Blongo"/,
        'Unknown aliases squawk appropriately';
}

done_testing();