~ubuntu-branches/ubuntu/saucy/libpod-pom-perl/saucy-proposed

« back to all changes in this revision

Viewing changes to t/text.t

  • Committer: Bazaar Package Importer
  • Author(s): Taku YASUI
  • Date: 2001-06-19 19:56:58 UTC
  • Revision ID: james.westby@ubuntu.com-20010619195658-7klk908yvhfl7gzg
Tags: upstream-0.02
ImportĀ upstreamĀ versionĀ 0.02

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -w                                         # -*- perl -*-
 
2
 
 
3
use strict;
 
4
use lib qw( ./lib ../lib );
 
5
use Pod::POM::Test;
 
6
 
 
7
my $DEBUG = 1;
 
8
 
 
9
ntests(7);
 
10
 
 
11
my $parser = Pod::POM->new();
 
12
my $pom = $parser->parse_file(\*DATA);
 
13
assert( $pom );
 
14
 
 
15
my $text = $pom->head1->[0]->text;
 
16
assert( $text );
 
17
match( scalar @$text, 2 );
 
18
match( $text->[0], 
 
19
       "A test Pod document.\n\n" );
 
20
match( $text->[1], 
 
21
       "Another paragraph with a B<bold> tag.\n\n" );
 
22
match( $text, 
 
23
       "A test Pod document.\n\n"
 
24
     . "Another paragraph with a B<bold> tag.\n\n" );
 
25
match( $pom->head1->[0],
 
26
       "=head1 NAME\n\n"
 
27
     . "A test Pod document.\n\n"
 
28
     . "Another paragraph with a B<bold> tag.\n\n" );
 
29
 
 
30
__DATA__
 
31
=head1 NAME
 
32
 
 
33
A test Pod document.
 
34
 
 
35
Another paragraph with a B<bold> tag.