#! /usr/bin/perl # #=============================================================================== # # FILE: html.t # # DESCRIPTION: Tests of HTML generation from various POD constructs # # FILES: --- # BUGS: --- # NOTES: --- # AUTHOR: Geoffrey Leach, # VERSION: 1.1.9 # CREATED: 10/28/07 09:56:16 PDT # REVISION: Wed Jan 20 05:23:16 PST 2010 # COPYRIGHT: (c) 2008-2010 Geoffrey Leach #=============================================================================== use 5.006002; use strict; use warnings; use lib qw(./t); use Run qw( run html_file ); use Pod::HtmlEasy::Data qw(NL); use version; our $VERSION = qv('1.1.9'); #--------------------------- test 4 my $html_file = html_file(); run(q{head1}, [ q{=head1 Testing POD}, q{`twas brillig and the slythe toes} . NL . q{did gyre and gimbal in the wave}, qq{=head1 NAME $html_file}, qq{Content of NAME: note the file is called $html_file}, q{=head1 E}, q{This is the content of a paragraph with less-than as title, ie., E}, ], [ q{

Testing POD

}, q{

`twas brillig and the slythe toes} . NL . q{did gyre and gimbal in the wave

}, qq{

NAME $html_file

}, qq{

Content of NAME: note the file is called $html_file

}, q{

<

}, q{

This is the content of a paragraph with less-than as title, ie., <

}, ], [ q{
  • Testing POD
  • }, qq{
  • NAME $html_file
  • }, q{
  • <
  • }, ], ); #--------------------------- test 5 run(q{head2}, [ q{=head2 Testing head2}, q{`twas brillig and the slythe toes} . NL . q{did gyre and gimbal in the wave}, q{=head2 NAME I}, q{Content of NAME with italicized content I} . NL . q{and code content C} . NL . q{This is head 2, so no title effect}, ], [ q{

    Testing head2

    }, q{

    `twas brillig and the slythe toes} . NL . q{did gyre and gimbal in the wave

    }, q{

    NAME foobar

    }, q{

    Content of NAME with italicized content foobar} . NL . q{and code content this is foo bar!} . NL . q{This is head 2, so no title effect

    }, ], [ q{}, ], ); #--------------------------- test 6 run(q{head3}, [ q{=head3 Testing head3}, q{`twas brillig and the slythe toes} . NL . q{did gyre and gimbal in the wave}, ], [ q{

    Testing head3

    }, q{

    `twas brillig and the slythe toes} . NL . q{did gyre and gimbal in the wave

    }, ], [ q{}, ], ); #--------------------------- test 7 run(q{head4}, [ q{=head4 Testing head4}, q{`twas brillig and the slythe toes} . NL . q{did gyre and gimbal in the wave}, ], [ q{

    Testing head4

    }, q{

    `twas brillig and the slythe toes} . NL . q{did gyre and gimbal in the wave

    }, ], [ q{}, ], ); #--------------------------- test 8 run(q{item}, [ q{=item Testing item and verbatum text}, q{ This text is indened one space} . NL . q{ which makes it verbatum}, q{=item *}, q{Starred}, q{The title of this item is "Starred" because it's "=item *"}, q{=item * Title on item line}, q{This item has a normal title and a asterisk, which is ignored}, q{=item * C<< text => 'string', >> and C<< text_regex => qr/regex/, >>}, q{=item C<<