Commit | Line | Data |
---|---|---|
9c7c0c6c | 1 | # encoding not error |
351625bd SP |
2 | BEGIN { |
3 | if($ENV{PERL_CORE}) { | |
4 | chdir 't'; | |
5 | @INC = '../lib'; | |
6 | } | |
7 | } | |
8 | ||
9 | use strict; | |
10 | use Test; | |
11 | BEGIN { plan tests => 4 }; | |
12 | ||
13 | #use Pod::Simple::Debug (5); | |
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 | ||
21 | { | |
22 | my @output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( q{ | |
23 | ||
24 | =encoding koi8-r | |
25 | ||
26 | =head1 NAME | |
27 | ||
28 | ëÏÇÄÁ ÞÉÔÁÌÁ ÔÙ ÍÕÞÉÔÅÌØÎÙÅ ÓÔÒÏËÉ -- Fet's "When you were reading" | |
29 | ||
30 | =cut | |
31 | ||
32 | } ); | |
33 | ||
34 | ||
35 | if(grep m/Unknown directive/i, @output_lines ) { | |
36 | ok 0; | |
37 | print "# I saw an Unknown directive warning here! :\n", | |
38 | map("#==> $_\n", @output_lines), "#\n#\n"; | |
39 | } else { | |
40 | ok 1; | |
41 | } | |
42 | ||
43 | } | |
44 | ||
45 | # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | |
46 | print "# Now a control group, to make sure that =fishbladder DOES\n", | |
47 | "# cause an 'unknown directive' error...\n"; | |
48 | ||
49 | { | |
50 | my @output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( q{ | |
51 | ||
52 | =fishbladder | |
53 | ||
54 | =head1 NAME | |
55 | ||
56 | Fet's "When you were reading" | |
57 | ||
58 | =cut | |
59 | ||
60 | } ); | |
61 | ||
62 | ||
63 | if(grep m/Unknown directive/i, @output_lines ) { | |
64 | ok 1; | |
65 | } else { | |
66 | ok 0; | |
67 | print "# But I didn't see an Unknows directive warning here! :\n", | |
68 | map("#==> $_\n", @output_lines), "#\n#\n"; | |
69 | } | |
70 | ||
71 | } | |
72 | ||
73 | ||
74 | ||
75 | print "#\n# And one for the road...\n"; | |
76 | ok 1; | |
77 |