Commit | Line | Data |
9ae4231f |
1 | #!/usr/local/bin/perl -w |
2 | |
3 | use lib qw(t/lib); |
4 | use 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 |
8 | use lib qw(blib/lib blib/arch); |
9 | use Test::More tests => 45; |
10 | |
11 | use CGI qw(:standard *h1 *h2 *h3 *h4 *h5 *h6 *table *ul *li *ol *td *b *i *u *div); |
12 | |
13 | is(start_h1(), "<h1>", "start_h1"); # TEST |
14 | is(start_h1({class => 'hello'}), "<h1 class=\"hello\">", "start_h1 with param"); # TEST |
15 | is(end_h1(), "</h1>", "end_h1"); # TEST |
16 | |
17 | is(start_h2(), "<h2>", "start_h2"); # TEST |
18 | is(start_h2({class => 'hello'}), "<h2 class=\"hello\">", "start_h2 with param"); # TEST |
19 | is(end_h2(), "</h2>", "end_h2"); # TEST |
20 | |
21 | is(start_h3(), "<h3>", "start_h3"); # TEST |
22 | is(start_h3({class => 'hello'}), "<h3 class=\"hello\">", "start_h3 with param"); # TEST |
23 | is(end_h3(), "</h3>", "end_h3"); # TEST |
24 | |
25 | is(start_h4(), "<h4>", "start_h4"); # TEST |
26 | is(start_h4({class => 'hello'}), "<h4 class=\"hello\">", "start_h4 with param"); # TEST |
27 | is(end_h4(), "</h4>", "end_h4"); # TEST |
28 | |
29 | is(start_h5(), "<h5>", "start_h5"); # TEST |
30 | is(start_h5({class => 'hello'}), "<h5 class=\"hello\">", "start_h5 with param"); # TEST |
31 | is(end_h5(), "</h5>", "end_h5"); # TEST |
32 | |
33 | is(start_h6(), "<h6>", "start_h6"); # TEST |
34 | is(start_h6({class => 'hello'}), "<h6 class=\"hello\">", "start_h6 with param"); # TEST |
35 | is(end_h6(), "</h6>", "end_h6"); # TEST |
36 | |
37 | is(start_table(), "<table>", "start_table"); # TEST |
38 | is(start_table({class => 'hello'}), "<table class=\"hello\">", "start_table with param"); # TEST |
39 | is(end_table(), "</table>", "end_table"); # TEST |
40 | |
41 | is(start_ul(), "<ul>", "start_ul"); # TEST |
42 | is(start_ul({class => 'hello'}), "<ul class=\"hello\">", "start_ul with param"); # TEST |
43 | is(end_ul(), "</ul>", "end_ul"); # TEST |
44 | |
45 | is(start_li(), "<li>", "start_li"); # TEST |
46 | is(start_li({class => 'hello'}), "<li class=\"hello\">", "start_li with param"); # TEST |
47 | is(end_li(), "</li>", "end_li"); # TEST |
48 | |
49 | is(start_ol(), "<ol>", "start_ol"); # TEST |
50 | is(start_ol({class => 'hello'}), "<ol class=\"hello\">", "start_ol with param"); # TEST |
51 | is(end_ol(), "</ol>", "end_ol"); # TEST |
52 | |
53 | is(start_td(), "<td>", "start_td"); # TEST |
54 | is(start_td({class => 'hello'}), "<td class=\"hello\">", "start_td with param"); # TEST |
55 | is(end_td(), "</td>", "end_td"); # TEST |
56 | |
57 | is(start_b(), "<b>", "start_b"); # TEST |
58 | is(start_b({class => 'hello'}), "<b class=\"hello\">", "start_b with param"); # TEST |
59 | is(end_b(), "</b>", "end_b"); # TEST |
60 | |
61 | is(start_i(), "<i>", "start_i"); # TEST |
62 | is(start_i({class => 'hello'}), "<i class=\"hello\">", "start_i with param"); # TEST |
63 | is(end_i(), "</i>", "end_i"); # TEST |
64 | |
65 | is(start_u(), "<u>", "start_u"); # TEST |
66 | is(start_u({class => 'hello'}), "<u class=\"hello\">", "start_u with param"); # TEST |
67 | is(end_u(), "</u>", "end_u"); # TEST |
68 | |
69 | is(start_div(), "<div>", "start_div"); # TEST |
70 | is(start_div({class => 'hello'}), "<div class=\"hello\">", "start_div with param"); # TEST |
71 | is(end_div(), "</div>", "end_div"); # TEST |
72 | |