xref: /openbsd/gnu/usr.bin/perl/ext/Pod-Html/t/htmlview.t (revision 9f11ffb7)
1898184e3Ssthen#!/usr/bin/perl -w                                         # -*- perl -*-
2898184e3Ssthen
3898184e3SsthenBEGIN {
4*9f11ffb7Safresh1    require "./t/pod2html-lib.pl";
5898184e3Ssthen}
6898184e3Ssthen
7898184e3Ssthenuse strict;
8898184e3Ssthenuse Test::More tests => 1;
9898184e3Ssthen
10898184e3Ssthenconvert_n_test("htmlview", "html rendering", "--quiet");
11898184e3Ssthen
12898184e3Ssthen__DATA__
13898184e3Ssthen<?xml version="1.0" ?>
14898184e3Ssthen<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
15898184e3Ssthen<html xmlns="http://www.w3.org/1999/xhtml">
16898184e3Ssthen<head>
17*9f11ffb7Safresh1<title>Test HTML Rendering</title>
18898184e3Ssthen<meta http-equiv="content-type" content="text/html; charset=utf-8" />
19898184e3Ssthen<link rev="made" href="mailto:[PERLADMIN]" />
20898184e3Ssthen</head>
21898184e3Ssthen
226fb12b70Safresh1<body>
23898184e3Ssthen
24898184e3Ssthen
25898184e3Ssthen
26898184e3Ssthen<ul id="index">
27898184e3Ssthen  <li><a href="#NAME">NAME</a></li>
28898184e3Ssthen  <li><a href="#SYNOPSIS">SYNOPSIS</a></li>
29898184e3Ssthen  <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
30898184e3Ssthen  <li><a href="#METHODS-OTHER-STUFF">METHODS =&gt; OTHER STUFF</a>
31898184e3Ssthen    <ul>
3291f110e0Safresh1      <li><a href="#new">new()</a></li>
3391f110e0Safresh1      <li><a href="#old">old()</a></li>
34898184e3Ssthen    </ul>
35898184e3Ssthen  </li>
36898184e3Ssthen  <li><a href="#TESTING-FOR-AND-BEGIN">TESTING FOR AND BEGIN</a></li>
37898184e3Ssthen  <li><a href="#TESTING-URLs-hyperlinking">TESTING URLs hyperlinking</a></li>
38898184e3Ssthen  <li><a href="#SEE-ALSO">SEE ALSO</a></li>
39898184e3Ssthen  <li><a href="#POD-ERRORS">POD ERRORS</a></li>
40898184e3Ssthen</ul>
41898184e3Ssthen
42898184e3Ssthen<h1 id="NAME">NAME</h1>
43898184e3Ssthen
44898184e3Ssthen<p>Test HTML Rendering</p>
45898184e3Ssthen
46898184e3Ssthen<h1 id="SYNOPSIS">SYNOPSIS</h1>
47898184e3Ssthen
48898184e3Ssthen<pre><code>    use My::Module;
49898184e3Ssthen
50898184e3Ssthen    my $module = My::Module-&gt;new();</code></pre>
51898184e3Ssthen
52898184e3Ssthen<h1 id="DESCRIPTION">DESCRIPTION</h1>
53898184e3Ssthen
54898184e3Ssthen<p>This is the description.</p>
55898184e3Ssthen
56898184e3Ssthen<pre><code>    Here is a verbatim section.</code></pre>
57898184e3Ssthen
58898184e3Ssthen<p>This is some more regular text.</p>
59898184e3Ssthen
60898184e3Ssthen<p>Here is some <b>bold</b> text, some <i>italic</i> and something that looks like an &lt;html&gt; tag. This is some <code>$code($arg1)</code>.</p>
61898184e3Ssthen
62898184e3Ssthen<p>This <code>text contains embedded <b>bold</b> and <i>italic</i> tags</code>. These can be nested, allowing <b>bold and <i>bold &amp; italic</i> text</b>. The module also supports the extended <b>syntax</b> and permits <i>nested tags &amp; other <b>cool</b> stuff</i></p>
63898184e3Ssthen
64898184e3Ssthen<h1 id="METHODS-OTHER-STUFF">METHODS =&gt; OTHER STUFF</h1>
65898184e3Ssthen
66898184e3Ssthen<p>Here is a list of methods</p>
67898184e3Ssthen
6891f110e0Safresh1<h2 id="new">new()</h2>
69898184e3Ssthen
70898184e3Ssthen<p>Constructor method. Accepts the following config options:</p>
71898184e3Ssthen
72898184e3Ssthen<dl>
73898184e3Ssthen
74898184e3Ssthen<dt id="foo">foo</dt>
75898184e3Ssthen<dd>
76898184e3Ssthen
77898184e3Ssthen<p>The foo item.</p>
78898184e3Ssthen
79898184e3Ssthen</dd>
80898184e3Ssthen<dt id="bar">bar</dt>
81898184e3Ssthen<dd>
82898184e3Ssthen
83898184e3Ssthen<p>The bar item.</p>
84898184e3Ssthen
85898184e3Ssthen<ul>
86898184e3Ssthen
87898184e3Ssthen<p>This is a list within a list</p>
88898184e3Ssthen
89898184e3Ssthen<p>*</p>
90898184e3Ssthen
91898184e3Ssthen<p>The wiz item.</p>
92898184e3Ssthen
93898184e3Ssthen<p>*</p>
94898184e3Ssthen
95898184e3Ssthen<p>The waz item.</p>
96898184e3Ssthen
97898184e3Ssthen</ul>
98898184e3Ssthen
99898184e3Ssthen</dd>
100898184e3Ssthen<dt id="baz">baz</dt>
101898184e3Ssthen<dd>
102898184e3Ssthen
103898184e3Ssthen<p>The baz item.</p>
104898184e3Ssthen
105898184e3Ssthen<ul>
106898184e3Ssthen
107898184e3Ssthen<li><p>A correct list within a list</p>
108898184e3Ssthen
109898184e3Ssthen</li>
110898184e3Ssthen<li><p>Boomerang</p>
111898184e3Ssthen
112898184e3Ssthen</li>
113898184e3Ssthen</ul>
114898184e3Ssthen
115898184e3Ssthen</dd>
116898184e3Ssthen</dl>
117898184e3Ssthen
118898184e3Ssthen<p>Title on the same line as the =item + * bullets</p>
119898184e3Ssthen
120898184e3Ssthen<ul>
121898184e3Ssthen
122898184e3Ssthen<li><p><code>Black</code> Cat</p>
123898184e3Ssthen
124898184e3Ssthen</li>
125898184e3Ssthen<li><p>Sat <span style="white-space: nowrap;"><i>on</i> the</span></p>
126898184e3Ssthen
127898184e3Ssthen</li>
128898184e3Ssthen<li><p>Mat&lt;!&gt;</p>
129898184e3Ssthen
130898184e3Ssthen</li>
131898184e3Ssthen</ul>
132898184e3Ssthen
133898184e3Ssthen<p>Title on the same line as the =item + numerical bullets</p>
134898184e3Ssthen
135898184e3Ssthen<ol>
136898184e3Ssthen
137898184e3Ssthen<li><p>Cat</p>
138898184e3Ssthen
139898184e3Ssthen</li>
140898184e3Ssthen<li><p>Sat</p>
141898184e3Ssthen
142898184e3Ssthen</li>
143898184e3Ssthen<li><p>Mat</p>
144898184e3Ssthen
145898184e3Ssthen</li>
146898184e3Ssthen</ol>
147898184e3Ssthen
148898184e3Ssthen<p>Numbered list with text on the same line</p>
149898184e3Ssthen
150898184e3Ssthen<dl>
151898184e3Ssthen
152898184e3Ssthen<dt id="Cat">1 Cat</dt>
153898184e3Ssthen<dd>
154898184e3Ssthen
155898184e3Ssthen</dd>
156898184e3Ssthen<dt id="Sat">2 Sat</dt>
157898184e3Ssthen<dd>
158898184e3Ssthen
159898184e3Ssthen</dd>
160898184e3Ssthen<dt id="Mat">3 Mat</dt>
161898184e3Ssthen<dd>
162898184e3Ssthen
163898184e3Ssthen</dd>
164898184e3Ssthen</dl>
165898184e3Ssthen
166898184e3Ssthen<p>No bullets, no title</p>
167898184e3Ssthen
168898184e3Ssthen<ul>
169898184e3Ssthen
170898184e3Ssthen<li><p>Cat</p>
171898184e3Ssthen
172898184e3Ssthen</li>
173898184e3Ssthen<li><p>Sat</p>
174898184e3Ssthen
175898184e3Ssthen</li>
176898184e3Ssthen<li><p>Mat</p>
177898184e3Ssthen
178898184e3Ssthen</li>
179898184e3Ssthen</ul>
180898184e3Ssthen
18191f110e0Safresh1<h2 id="old">old()</h2>
182898184e3Ssthen
183898184e3Ssthen<p>Destructor method</p>
184898184e3Ssthen
185898184e3Ssthen<h1 id="TESTING-FOR-AND-BEGIN">TESTING FOR AND BEGIN</h1>
186898184e3Ssthen
187898184e3Ssthen
188898184e3Ssthen
189898184e3Ssthen<br />
190898184e3Ssthen<p>
191898184e3Ssthenblah blah
192898184e3Ssthen</p>
193898184e3Ssthen
194898184e3Ssthen<p>intermediate text</p>
195898184e3Ssthen
196898184e3Ssthen<more>
197898184e3SsthenHTML
198b8851fccSafresh1</more>
199b8851fccSafresh1
200b8851fccSafresh1some text
201898184e3Ssthen
202898184e3Ssthen<h1 id="TESTING-URLs-hyperlinking">TESTING URLs hyperlinking</h1>
203898184e3Ssthen
204898184e3Ssthen<p>This is an href link1: http://example.com</p>
205898184e3Ssthen
206898184e3Ssthen<p>This is an href link2: http://example.com/foo/bar.html</p>
207898184e3Ssthen
208898184e3Ssthen<p>This is an email link: mailto:foo@bar.com</p>
209898184e3Ssthen
210898184e3Ssthen<pre><code>    This is a link in a verbatim block &lt;a href=&quot;http://perl.org&quot;&gt; Perl &lt;/a&gt;</code></pre>
211898184e3Ssthen
212898184e3Ssthen<h1 id="SEE-ALSO">SEE ALSO</h1>
213898184e3Ssthen
214898184e3Ssthen<p>See also <a href="/t/htmlescp.html">Test Page 2</a>, the <a>Your::Module</a> and <a>Their::Module</a> manpages and the other interesting file <i>/usr/local/my/module/rocks</i> as well.</p>
215898184e3Ssthen
216898184e3Ssthen<h1 id="POD-ERRORS">POD ERRORS</h1>
217898184e3Ssthen
218898184e3Ssthen<p>Hey! <b>The above document had some coding errors, which are explained below:</b></p>
219898184e3Ssthen
220898184e3Ssthen<dl>
221898184e3Ssthen
22291f110e0Safresh1<dt id="Around-line-45">Around line 45:</dt>
223898184e3Ssthen<dd>
224898184e3Ssthen
225898184e3Ssthen<p>You can&#39;t have =items (as at line 49) unless the first thing after the =over is an =item</p>
226898184e3Ssthen
227898184e3Ssthen</dd>
228898184e3Ssthen</dl>
229898184e3Ssthen
230898184e3Ssthen
231898184e3Ssthen</body>
232898184e3Ssthen
233898184e3Ssthen</html>
234898184e3Ssthen
235898184e3Ssthen
236