Commit | Line | Data |
0c35a640 |
1 | #!./perl |
2 | |
3 | BEGIN { chdir 't' if -d 't'; @INC = '../lib' } |
4 | |
5 | use Pod::Plainer; |
6 | my $parser = Pod::Plainer->new(); |
7 | my $header = "=pod\n\n"; |
8 | my $input = 'plnr_in.pod'; |
9 | my $output = 'plnr_out.pod'; |
10 | |
11 | my $test = 0; |
12 | print "1..7\n"; |
13 | while( <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 |
34 | close OUT; |
35 | close IN; |
0c35a640 |
36 | } |
37 | |
9217eab1 |
38 | END { |
39 | 1 while unlink $input; |
40 | 1 while unlink $output; |
41 | } |
0c35a640 |
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 |
48 | e.g. C<< Foo->bar() >> or C<< $obj->bar() >> |
49 | e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()> |
50 | The C<< => >> operator is mostly just a more visually distinctive |
51 | The C<=E<gt>> operator is mostly just a more visually distinctive |
52 | C<uv < 0x80> in which case you can use C<*s = uv>. |
53 | C<uv E<lt> 0x80> in which case you can use C<*s = uv>. |
54 | C<time ^ ($$ + ($$ << 15))>), but that isn't necessary any more. |
55 | C<time ^ ($$ + ($$ E<lt>E<lt> 15))>), but that isn't necessary any more. |
56 | The bitwise operation C<<< >> >>> |
57 | The bitwise operation C<E<gt>E<gt>> |