This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Strip whitespace from the beginning of static_ext:
[perl5.git] / t / pod / plainer.t
CommitLineData
0c35a640
RB
1#!./perl
2
3BEGIN { chdir 't' if -d 't'; @INC = '../lib' }
4
5use Pod::Plainer;
6my $parser = Pod::Plainer->new();
7my $header = "=pod\n\n";
8my $input = 'plnr_in.pod';
9my $output = 'plnr_out.pod';
10
11my $test = 0;
12print "1..7\n";
13while( <DATA> ) {
14 my $expected = $header.<DATA>;
15
16 open(IN, '>', $input) or die $!;
17 print IN $header, $_;
18 close IN or die $!;
19
20 open IN, '<', $input or die $!;
21 open OUT, '>', $output or die $!;
22 $parser->parse_from_filehandle(\*IN,\*OUT);
23
24 open OUT, '<', $output or die $!;
25 my $returned; { local $/; $returned = <OUT>; }
26
27 unless( $returned eq $expected ) {
28 print map { s/^/\#/mg; $_; }
29 map {+$_} # to avoid readonly values
30 "EXPECTED:\n", $expected, "GOT:\n", $returned;
31 print "not ";
32 }
33 printf "ok %d\n", ++$test;
7717d7fd
PK
34 close OUT;
35 close IN;
0c35a640
RB
36}
37
9217eab1
PP
38END {
39 1 while unlink $input;
40 1 while unlink $output;
41}
0c35a640
RB
42
43__END__
44=head <> now reads in records
45=head E<lt>E<gt> now reads in records
46=item C<-T> and C<-B> not implemented on filehandles
47=item C<-T> and C<-B> not implemented on filehandles
48e.g. C<< Foo->bar() >> or C<< $obj->bar() >>
49e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()>
50The C<< => >> operator is mostly just a more visually distinctive
51The C<=E<gt>> operator is mostly just a more visually distinctive
52C<uv < 0x80> in which case you can use C<*s = uv>.
53C<uv E<lt> 0x80> in which case you can use C<*s = uv>.
54C<time ^ ($$ + ($$ << 15))>), but that isn't necessary any more.
55C<time ^ ($$ + ($$ E<lt>E<lt> 15))>), but that isn't necessary any more.
56The bitwise operation C<<< >> >>>
57The bitwise operation C<E<gt>E<gt>>