Add ARM files
[dh-make-perl] / dev / arm / libwww-mechanize-perl / libwww-mechanize-perl-1.34 / t / regex-error.t
1 #!perl -Tw
2
3 use warnings;
4 use strict;
5 use Test::More;
6
7 BEGIN {
8     eval 'use Test::Warn';
9     plan skip_all => "Test::Warn required to test $0" if $@;
10     plan tests => 4;
11 }
12
13 BEGIN {
14     use_ok( 'WWW::Mechanize' );
15 }
16
17 my $m = WWW::Mechanize->new;
18 isa_ok( $m, 'WWW::Mechanize' );
19
20 warning_like {
21     $m->find_link( link_regex => 'foo' );
22 } qr[Unknown link-finding parameter "link_regex".+line \d+], 'Passes message, and includes the line number';
23
24 warning_like {
25     $m->find_link( url_regex => 'foo' );
26 } qr[foo passed as url_regex is not a regex.+line \d+], 'Passes message, and includes the line number';
27