]> Dogcows Code - chaz/p5-CGI-Ex/blob - t/1_validate_00_base.t
CGI::Ex 2.00
[chaz/p5-CGI-Ex] / t / 1_validate_00_base.t
1 # -*- Mode: Perl; -*-
2
3 =head1 NAME
4
5 1_validate_00_base.t - Test CGI::Ex::Validate's ability to compile and execute
6
7 =cut
8
9 use strict;
10 use Test::More tests => 3;
11
12 use_ok('CGI::Ex::Validate');
13
14 my $form = {
15 user => 'abc',
16 pass => '123',
17 };
18 my $val = {
19 user => {
20 required => 1,
21 },
22 pass => {
23 required => 1,
24 },
25 };
26
27 my $err_obj = CGI::Ex::Validate::validate($form, $val);
28 ok(! $err_obj, "Basic function works");
29
30 ###----------------------------------------------------------------###
31
32 $form = {
33 user => 'abc',
34 # pass => '123',
35 };
36
37 $err_obj = CGI::Ex::Validate::validate($form,$val);
38
39 ok($err_obj, "Successfully failed");
This page took 0.037305 seconds and 4 git commands to generate.