1#!/usr/bin/perl -w                                         # -*- perl -*-
2
3use strict;
4use lib qw( ./lib ../lib );
5use Pod::POM;
6use Pod::POM::View::HTML;
7use Pod::POM::Test;
8
9ntests(2);
10
11$Pod::POM::DEFAULT_VIEW = 'Pod::POM::View::HTML';
12
13my $text;
14{   local $/ = undef;
15    $text = <DATA>;
16}
17my ($test, $expect) = split(/\s*-------+\s*/, $text);
18
19my $parser = Pod::POM->new();
20
21my $pom = $parser->parse_text($test);
22
23assert( $pom );
24
25my $result = "$pom";
26
27for ($result, $expect) {
28    s/^\s*//;
29    s/\s*$//;
30}
31
32match($result, $expect);
33#print $pom;
34
35__DATA__
36=head1 NAME
37
38I am a stupid fool who puts naked < & > characters in my POD
39instead of escaping them as E<lt> and E<gt>.
40
41Here is some B<bold> text, some I<italic> plus F</etc/fstab>
42file and something that looks like an E<lt>htmlE<gt> tag.
43This is some C<$code($arg1)>.
44
45------------------------------------------------------------------------
46
47<html>
48<body bgcolor="#ffffff">
49<h1>NAME</h1>
50
51<p>I am a stupid fool who puts naked &lt; &amp; &gt; characters in my POD
52instead of escaping them as &lt; and &gt;.</p>
53<p>Here is some <b>bold</b> text, some <i>italic</i> plus <i>/etc/fstab</i>
54file and something that looks like an &lt;html&gt; tag.
55This is some <code>$code($arg1)</code>.</p>
56</body>
57</html>
58
59