The (emulated) "no utf8" must be in a BEGIN block
[p5sagit/p5-mst-13.2.git] / lib / CGI / t / pretty.t
1 #!/usr/local/bin/perl -w
2
3 use strict;
4 use lib 't/lib','../blib/lib','./blib/lib';
5 use Test::More tests => 5;
6
7 BEGIN { use_ok('CGI::Pretty') };
8
9 # This is silly use_ok should take arguments
10 use CGI::Pretty (':all');
11
12 is(h1(), '<h1>',"single tag");
13
14 is(ol(li('fred'),li('ethel')), <<HTML,   "basic indentation");
15 <ol>
16         <li>
17                 fred
18         </li>
19         <li>
20                 ethel
21         </li>
22 </ol>
23 HTML
24
25
26 is(p('hi',pre('there'),'frog'), <<HTML, "<pre> tags");
27 <p>
28         hi <pre>there</pre>
29         frog
30 </p>
31 HTML
32
33
34 is(p('hi',a({-href=>'frog'},'there'),'frog'), <<HTML,   "as-is");
35 <p>
36         hi <a href="frog">there</a>
37         frog
38 </p>
39 HTML
40