summaryrefslogtreecommitdiff
path: root/ext/CGI/t/pretty.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-10-01 14:21:16 +0100
committerNicholas Clark <nick@ccl4.org>2009-10-01 14:21:16 +0100
commite9dc4a2bf6ff50c27a5bd2e83ff4755923a33e7a (patch)
tree47d916204681e691f7c15002f5ad25fd8489d10e /ext/CGI/t/pretty.t
parent3fe7d1fbbb0f3821a413b2c6d13fa8821c6230d3 (diff)
downloadperl-e9dc4a2bf6ff50c27a5bd2e83ff4755923a33e7a.tar.gz
Move CGI from ext/ to cpan/
Diffstat (limited to 'ext/CGI/t/pretty.t')
-rw-r--r--ext/CGI/t/pretty.t121
1 files changed, 0 insertions, 121 deletions
diff --git a/ext/CGI/t/pretty.t b/ext/CGI/t/pretty.t
deleted file mode 100644
index d3c19c0c98..0000000000
--- a/ext/CGI/t/pretty.t
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/bin/perl -w
-
-use strict;
-use lib '.', 't/lib','../blib/lib','./blib/lib';
-use Test::More tests => 18;
-
-BEGIN { use_ok('CGI::Pretty') };
-
-# This is silly use_ok should take arguments
-use CGI::Pretty (':all');
-
-is(h1(), '<h1 />
-',"single tag");
-
-is(ol(li('fred'),li('ethel')), <<HTML, "basic indentation");
-<ol>
- <li>
- fred
- </li>
- <li>
- ethel
- </li>
-</ol>
-HTML
-
-
-is(p('hi',pre('there'),'frog'), <<HTML, "<pre> tags");
-<p>
- hi <pre>there</pre>
- frog
-</p>
-HTML
-
-is(h1({-align=>'CENTER'},'fred'), <<HTML, "open/close tag with attribute");
-<h1 align="CENTER">
- fred
-</h1>
-HTML
-
-is(h1({-align=>undef},'fred'), <<HTML,"open/close tag with orphan attribute");
-<h1 align>
- fred
-</h1>
-HTML
-
-is(h1({-align=>'CENTER'},['fred','agnes']), <<HTML, "distributive tag with attribute");
-<h1 align="CENTER">
- fred
-</h1>
-<h1 align="CENTER">
- agnes
-</h1>
-HTML
-
-is(p('hi',a({-href=>'frog'},'there'),'frog'), <<HTML, "as-is");
-<p>
- hi <a href="frog">there</a>
- frog
-</p>
-HTML
-
-is(p([ qw( hi there frog ) ] ), <<HTML, "array-reference");
-<p>
- hi
-</p>
-<p>
- there
-</p>
-<p>
- frog
-</p>
-HTML
-
-is(p(p(p('hi'), 'there' ), 'frog'), <<HTML, "nested tags");
-<p>
- <p>
- <p>
- hi
- </p>
- there
- </p>
- frog
-</p>
-HTML
-
-is(table(TR(td(table(TR(td('hi', 'there', 'frog')))))), <<HTML, "nested as-is tags");
-<table>
- <tr>
- <td><table>
- <tr>
- <td>hi there frog</td>
- </tr>
- </table></td>
- </tr>
-</table>
-HTML
-
-is(table(TR(td(table(TR(td( [ qw( hi there frog ) ])))))), <<HTML, "nested as-is array-reference");
-<table>
- <tr>
- <td><table>
- <tr>
- <td>hi</td>
- <td>there</td>
- <td>frog</td>
- </tr>
- </table></td>
- </tr>
-</table>
-HTML
-
-$CGI::Pretty::INDENT = $CGI::Pretty::LINEBREAK = "";
-
-is(h1(), '<h1 />',"single tag (pretty turned off)");
-is(h1('fred'), '<h1>fred</h1>',"open/close tag (pretty turned off)");
-is(h1('fred','agnes','maura'), '<h1>fred agnes maura</h1>',"open/close tag multiple (pretty turned off)");
-is(h1({-align=>'CENTER'},'fred'), '<h1 align="CENTER">fred</h1>',"open/close tag with attribute (pretty turned off)");
-is(h1({-align=>undef},'fred'), '<h1 align>fred</h1>',"open/close tag with orphan attribute (pretty turned off)");
-is(h1({-align=>'CENTER'},['fred','agnes']), '<h1 align="CENTER">fred</h1> <h1 align="CENTER">agnes</h1>',
- "distributive tag with attribute (pretty turned off)");
-