File: html03.t

package info (click to toggle)
perl 5.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (21 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (3)
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>} );