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