This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Update Pod-Simple to CPAN version 3.18
[perl5.git] / cpan / Pod-Simple / t / chunking.t
CommitLineData
351625bd
SP
1BEGIN {
2 if($ENV{PERL_CORE}) {
3 chdir 't';
4 @INC = '../lib';
5 }
6}
7
8#use Pod::Simple::Debug (2);
9
10use strict;
11use Test;
12BEGIN { plan tests => 11 };
13
14
15ok 1;
16
17use Pod::Simple::DumpAsXML;
18use Pod::Simple::XMLOutStream;
19print "# Pod::Simple version $Pod::Simple::VERSION\n";
20sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
21
22ok( Pod::Simple::XMLOutStream->_out("=head1 =head1"),
23 '<Document><head1>=head1</head1></Document>'
24);
25
26ok( Pod::Simple::XMLOutStream->_out("\n=head1 =head1"),
27 '<Document><head1>=head1</head1></Document>'
28);
29
30ok( Pod::Simple::XMLOutStream->_out("\n=head1 =head1\n"),
31 '<Document><head1>=head1</head1></Document>'
32);
33
34ok( Pod::Simple::XMLOutStream->_out("\n=head1 =head1\n\n"),
35 '<Document><head1>=head1</head1></Document>'
36);
37
38&ok(e "\n=head1 =head1\n\n" , "\n=head1 =head1\n\n");
39
40&ok(e "\n=head1\n=head1\n\n", "\n=head1 =head1\n\n");
41
42&ok(e "\n=pod\n\nCha cha cha\n\n" , "\n=pod\n\nCha cha cha\n\n");
43&ok(e "\n=pod\n\nCha\tcha cha\n\n" , "\n=pod\n\nCha cha cha\n\n");
44&ok(e "\n=pod\n\nCha\ncha cha\n\n" , "\n=pod\n\nCha cha cha\n\n");
45
46print "# Wrapping up... one for the road...\n";
47ok 1;
48print "# --- Done with ", __FILE__, " --- \n";
49