5 1_validate_00_base.t - Test CGI::Ex::Validate's ability to compile and execute
10 use Test::More tests => 5;
12 use_ok('CGI::Ex::Validate');
27 my $err_obj = CGI::Ex::Validate::validate($form, $val);
28 ok(! $err_obj, "Basic function works");
30 ###----------------------------------------------------------------###
37 $err_obj = CGI::Ex::Validate::validate($form,$val);
39 ok($err_obj, "Successfully failed");
41 ###----------------------------------------------------------------###
43 eval { CGI::Ex::Validate::validate($form,undef) };
44 ok($@, "Needs to have a hashref");
46 ###----------------------------------------------------------------###
48 $err_obj = CGI::Ex::Validate::validate($form,{});
50 ok(!$err_obj, "OK with empty hash");