This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
f51766dd7b08ae4b18d67d23a778551e4be7bb5e
[perl5.git] / ext / Pod-Simple / t / chunking.t
1 BEGIN {
2     if($ENV{PERL_CORE}) {
3         chdir 't';
4         @INC = '../lib';
5     }
6 }
7
8 #use Pod::Simple::Debug (2);
9
10 use strict;
11 use Test;
12 BEGIN { plan tests => 11 };
13
14
15 ok 1;
16
17 use Pod::Simple::DumpAsXML;
18 use Pod::Simple::XMLOutStream;
19 print "# Pod::Simple version $Pod::Simple::VERSION\n";
20 sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
21
22 ok( Pod::Simple::XMLOutStream->_out("=head1 =head1"),
23     '<Document><head1>=head1</head1></Document>'
24 );
25
26 ok( Pod::Simple::XMLOutStream->_out("\n=head1 =head1"),
27     '<Document><head1>=head1</head1></Document>'
28 );
29
30 ok( Pod::Simple::XMLOutStream->_out("\n=head1 =head1\n"),
31     '<Document><head1>=head1</head1></Document>'
32 );
33
34 ok( 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
46 print "# Wrapping up... one for the road...\n";
47 ok 1;
48 print "# --- Done with ", __FILE__, " --- \n";
49