allow MIME::QuotePrint to handle ASCII code numbers on EBCDIC machines
[p5sagit/p5-mst-13.2.git] / t / pod / plainer.t
CommitLineData
0c35a640 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;
34}
35
9217eab1 36END {
37 1 while unlink $input;
38 1 while unlink $output;
39}
0c35a640 40
41__END__
42=head <> now reads in records
43=head E<lt>E<gt> now reads in records
44=item C<-T> and C<-B> not implemented on filehandles
45=item C<-T> and C<-B> not implemented on filehandles
46e.g. C<< Foo->bar() >> or C<< $obj->bar() >>
47e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()>
48The C<< => >> operator is mostly just a more visually distinctive
49The C<=E<gt>> operator is mostly just a more visually distinctive
50C<uv < 0x80> in which case you can use C<*s = uv>.
51C<uv E<lt> 0x80> in which case you can use C<*s = uv>.
52C<time ^ ($$ + ($$ << 15))>), but that isn't necessary any more.
53C<time ^ ($$ + ($$ E<lt>E<lt> 15))>), but that isn't necessary any more.
54The bitwise operation C<<< >> >>>
55The bitwise operation C<E<gt>E<gt>>