File: 19_url.t

package info (click to toggle)
libformvalidator-simple-perl 0.29-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 412 kB
  • sloc: perl: 3,043; makefile: 4
file content (19 lines) | stat: -rw-r--r-- 367 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use Test::More tests => 3;
use CGI;

BEGIN{ use_ok("FormValidator::Simple") }

my $q = CGI->new;

$q->param( hoge => 'http://www.lost-season.jp/mt/' );
$q->param( foo  => 'lyo.kato@gmail.com' );

my $r = FormValidator::Simple->check( $q => [
    hoge => [ 'HTTP_URL' ],
    foo  => [ 'HTTP_URL' ],
] );

ok(!$r->invalid('hoge'));

ok($r->invalid('foo'));