use Test::More;
-plan tests => 72;
+plan tests => 80;
use_ok('HTML::Form::Simple');
my $form = HTML::Form::Simple->new;
ok($form, 'new form');
+# basics
+
+is(
+ $form->quote('<"test">'),
+ '<"test">',
+ 'quote'
+);
+
+is(
+ $form->quote(\'<"test">'),
+ '<"test">',
+ 'quote unquoted'
+);
+
+is(
+ $form->tag('foo'),
+ '<foo>',
+ 'tag'
+);
+
+is(
+ $form->tag('a "' => {'b"' => 'c"'}),
+ '<a " b"="c"">',
+ 'tag attributes'
+);
+
# form
is(
'various checkboxes'
);
+# row
+
+is(
+ $form->row(undef),
+ '<label></label> <input type="text">',
+ 'empty row'
+);
+
+is(
+ $form->row('test'),
+ '<label for="test">test</label> <input id="test" name="test" type="text">',
+ 'standard row'
+);
+
+is(
+ $form->row('test', {type => 'password'}, {for => '', label => '"blah"'}),
+ '<label>"blah"</label> <input id="test" name="test" type="password">',
+ 'row options'
+);
+
+is(
+ $form->row('test', '"scalar"', {for => ''}),
+ '<label>test</label> "scalar"',
+ 'row scalar'
+);
+
# defaults
my $defform = HTML::Form::Simple->new({foo => '<">', '' => 'empty', 0 => 0});