File: text.t

package info (click to toggle)
libpod-pom-perl 2.01-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 800 kB
  • sloc: perl: 2,756; makefile: 7
file content (35 lines) | stat: -rw-r--r-- 784 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/perl -w                                         # -*- perl -*-

use strict;
use lib qw( ./lib ../lib );
use Pod::POM::Test;

my $DEBUG = 1;

ntests(7);

my $parser = Pod::POM->new();
my $pom = $parser->parse_file(\*DATA);
assert( $pom );

my $text = $pom->head1->[0]->text;
assert( $text );
match( scalar @$text, 2 );
match( $text->[0], 
       "A test Pod document.\n\n" );
match( $text->[1], 
       "Another paragraph with a B<bold> tag.\n\n" );
match( $text, 
       "A test Pod document.\n\n"
     . "Another paragraph with a B<bold> tag.\n\n" );
match( $pom->head1->[0],
       "=head1 NAME\n\n"
     . "A test Pod document.\n\n"
     . "Another paragraph with a B<bold> tag.\n\n" );

__DATA__
=head1 NAME

A test Pod document.

Another paragraph with a B<bold> tag.