File: html03.t

package info (click to toggle)
libpod-simple-perl 3.47-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,760 kB
  • sloc: perl: 7,073; xml: 2,427; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Testing HTML titles
use strict;
use warnings;
use Test::More tests => 5;

#use Pod::Simple::Debug (10);

use Pod::Simple::HTML;

sub x { Pod::Simple::HTML->_out(
  #sub{  $_[0]->bare_output(1)  },
  "=pod\n\n$_[0]",
) }

# make sure empty file => empty output

is( x(''),'', "Contentlessness" );
like( x(qq{=pod\n\nThis is a paragraph}), qr{<title></title>}i );
like( x(qq{This is a paragraph}), qr{<title></title>}i );
like( x(qq{=head1 Prok\n\nThis is a paragraph}), qr{<title>Prok</title>}i );
like( x(qq{=head1 NAME\n\nProk -- stuff\n\nThis}), qr{<title>Prok</title>} );