Upgrade to CGI.pm-3.48
[perl.git] / cpan / CGI / t / checkbox_group.t
1 #!/usr/local/bin/perl -w
2
3 use Test::More tests => 3;
4
5 BEGIN { use_ok('CGI'); };
6 use CGI (':standard','-no_debug','-no_xhtml');
7
8 # no_xhtml test on checkbox_group()
9 is(checkbox_group(-name       => 'game',
10                   '-values'   => [qw/checkers chess cribbage/],
11                   '-defaults' => ['cribbage']),
12    qq(<input type="checkbox" name="game" value="checkers" >checkers <input type="checkbox" name="game" value="chess" >chess <input type="checkbox" name="game" value="cribbage" checked >cribbage),
13    'checkbox_group()');
14
15 #  xhtml test on checkbox_group()
16 $CGI::XHTML = 1;
17 is(checkbox_group(-name       => 'game',
18                   '-values'   => [qw/checkers chess cribbage/],
19                   '-defaults' => ['cribbage']),
20    qq(<label><input type="checkbox" name="game" value="checkers" />checkers</label> <label><input type="checkbox" name="game" value="chess" />chess</label> <label><input type="checkbox" name="game" value="cribbage" checked="checked" />cribbage</label>),
21    'checkbox_group()');