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