X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=t%2F2_fill_00_base.t;h=bf955b2d8faf8c4747ea5841282df54f8eccdf48;hb=HEAD;hp=bb1348f42c3ff0cf6bbf59e9a18709abaac90e82;hpb=85070b46d0a93ddbeef07341421adb8389a55418;p=chaz%2Fp5-CGI-Ex
diff --git a/t/2_fill_00_base.t b/t/2_fill_00_base.t
index bb1348f..bf955b2 100644
--- a/t/2_fill_00_base.t
+++ b/t/2_fill_00_base.t
@@ -1,8 +1,149 @@
+# -*-perl-*-
-BEGIN {
- print "1..1\n";
-}
+=head1 NAME
-use CGI::Ex::Fill;
+2_fill_00_base.t - Test CGI::Ex::Fill's base ability.
-BEGIN { print "ok 1\n"; }
+=cut
+
+use strict;
+use Test::More tests => 6;
+
+use_ok qw(CGI::Ex::Fill);
+
+###----------------------------------------------------------------###
+
+ my $form = {foo => "FOO", bar => "BAR", baz => "BAZ"};
+
+ my $html = '
+
+
+
+
+
+
+ ';
+
+ CGI::Ex::Fill::form_fill(\$html, $form);
+
+ ok(
+ $html eq '
+
+
+
+
+
+
+ ', "perldoc example 1 passed");
+
+ #print $html;
+
+###----------------------------------------------------------------###
+
+ $form = {foo => ['aaaa', 'bbbb', 'cccc']};
+
+ $html = '
+
+
+
+
+
+ ';
+
+ form_fill(\$html, $form);
+
+ ok(
+ $html eq '
+
+
+
+
+
+ ', "Perldoc example 2 passed");
+
+ #print $html;
+
+###----------------------------------------------------------------###
+
+ $form = {foo => 'FOO', bar => ['aaaa', 'bbbb', 'cccc'], baz => 'on'};
+
+ $html = '
+
+
+
+
+
+
+ ';
+
+ form_fill(\$html, $form);
+
+ ok(
+ $html eq '
+
+
+
+
+
+
+ ', "Perldoc example 3 passed");
+
+ #print $html;
+
+###----------------------------------------------------------------###
+
+ $form = {foo => 'FOO', bar => ['aaaa', 'bbbb', 'cccc']};
+
+ $html = '
+