1# encoding not error
2BEGIN {
3    if($ENV{PERL_CORE}) {
4        chdir 't';
5        @INC = '../lib';
6    }
7}
8
9use strict;
10use warnings;
11use Test;
12BEGIN { plan tests => 4 };
13
14#use Pod::Simple::Debug (5);
15
16ok 1;
17
18use Pod::Simple::DumpAsXML;
19use Pod::Simple::XMLOutStream;
20print "# Pod::Simple version $Pod::Simple::VERSION\n";
21
22{
23my @output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( q{
24
25=encoding koi8-r
26
27=head1 NAME
28
29����� ������ �� ����������� ������ -- Fet's "When you were reading"
30
31=cut
32
33} );
34
35
36if(grep m/Unknown directive/i, @output_lines ) {
37  ok 0;
38  print "# I saw an Unknown directive warning here! :\n",
39    map("#==> $_\n", @output_lines), "#\n#\n";
40} else {
41  ok 1;
42}
43
44}
45
46# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
47print "# Now a control group, to make sure that =fishbladder DOES\n",
48      "#  cause an 'unknown directive' error...\n";
49
50{
51my @output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( q{
52
53=fishbladder
54
55=head1 NAME
56
57Fet's "When you were reading"
58
59=cut
60
61} );
62
63
64if(grep m/Unknown directive/i, @output_lines ) {
65  ok 1;
66} else {
67  ok 0;
68  print "# But I didn't see an Unknows directive warning here! :\n",
69    map("#==> $_\n", @output_lines), "#\n#\n";
70}
71
72}
73
74
75
76print "#\n# And one for the road...\n";
77ok 1;
78
79