This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move CGI from ext/ to cpan/
[perl5.git] / cpan / CGI / t / start_end_asterisk.t
CommitLineData
9ae4231f
SP
1#!/usr/local/bin/perl -w
2
3use lib qw(t/lib);
4use strict;
5
6# Due to a bug in older versions of MakeMaker & Test::Harness, we must
7# ensure the blib's are in @INC, else we might use the core CGI.pm
8use lib qw(blib/lib blib/arch);
9use Test::More tests => 45;
10
11use CGI qw(:standard *h1 *h2 *h3 *h4 *h5 *h6 *table *ul *li *ol *td *b *i *u *div);
12
13is(start_h1(), "<h1>", "start_h1"); # TEST
14is(start_h1({class => 'hello'}), "<h1 class=\"hello\">", "start_h1 with param"); # TEST
15is(end_h1(), "</h1>", "end_h1"); # TEST
16
17is(start_h2(), "<h2>", "start_h2"); # TEST
18is(start_h2({class => 'hello'}), "<h2 class=\"hello\">", "start_h2 with param"); # TEST
19is(end_h2(), "</h2>", "end_h2"); # TEST
20
21is(start_h3(), "<h3>", "start_h3"); # TEST
22is(start_h3({class => 'hello'}), "<h3 class=\"hello\">", "start_h3 with param"); # TEST
23is(end_h3(), "</h3>", "end_h3"); # TEST
24
25is(start_h4(), "<h4>", "start_h4"); # TEST
26is(start_h4({class => 'hello'}), "<h4 class=\"hello\">", "start_h4 with param"); # TEST
27is(end_h4(), "</h4>", "end_h4"); # TEST
28
29is(start_h5(), "<h5>", "start_h5"); # TEST
30is(start_h5({class => 'hello'}), "<h5 class=\"hello\">", "start_h5 with param"); # TEST
31is(end_h5(), "</h5>", "end_h5"); # TEST
32
33is(start_h6(), "<h6>", "start_h6"); # TEST
34is(start_h6({class => 'hello'}), "<h6 class=\"hello\">", "start_h6 with param"); # TEST
35is(end_h6(), "</h6>", "end_h6"); # TEST
36
37is(start_table(), "<table>", "start_table"); # TEST
38is(start_table({class => 'hello'}), "<table class=\"hello\">", "start_table with param"); # TEST
39is(end_table(), "</table>", "end_table"); # TEST
40
41is(start_ul(), "<ul>", "start_ul"); # TEST
42is(start_ul({class => 'hello'}), "<ul class=\"hello\">", "start_ul with param"); # TEST
43is(end_ul(), "</ul>", "end_ul"); # TEST
44
45is(start_li(), "<li>", "start_li"); # TEST
46is(start_li({class => 'hello'}), "<li class=\"hello\">", "start_li with param"); # TEST
47is(end_li(), "</li>", "end_li"); # TEST
48
49is(start_ol(), "<ol>", "start_ol"); # TEST
50is(start_ol({class => 'hello'}), "<ol class=\"hello\">", "start_ol with param"); # TEST
51is(end_ol(), "</ol>", "end_ol"); # TEST
52
53is(start_td(), "<td>", "start_td"); # TEST
54is(start_td({class => 'hello'}), "<td class=\"hello\">", "start_td with param"); # TEST
55is(end_td(), "</td>", "end_td"); # TEST
56
57is(start_b(), "<b>", "start_b"); # TEST
58is(start_b({class => 'hello'}), "<b class=\"hello\">", "start_b with param"); # TEST
59is(end_b(), "</b>", "end_b"); # TEST
60
61is(start_i(), "<i>", "start_i"); # TEST
62is(start_i({class => 'hello'}), "<i class=\"hello\">", "start_i with param"); # TEST
63is(end_i(), "</i>", "end_i"); # TEST
64
65is(start_u(), "<u>", "start_u"); # TEST
66is(start_u({class => 'hello'}), "<u class=\"hello\">", "start_u with param"); # TEST
67is(end_u(), "</u>", "end_u"); # TEST
68
69is(start_div(), "<div>", "start_div"); # TEST
70is(start_div({class => 'hello'}), "<div class=\"hello\">", "start_div with param"); # TEST
71is(end_div(), "</div>", "end_div"); # TEST
72