~ubuntu-branches/ubuntu/gutsy/horae/gutsy

« back to all changes in this revision

Viewing changes to 0CPAN/Pod-Simple-3.03/t/encoding_not_error0.t

  • Committer: Bazaar Package Importer
  • Author(s): Carlo Segre
  • Date: 2006-12-28 12:36:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20061228123648-9xnjr76wfthd92cq
Tags: 064-1
New upstream release, dropped dependency on libtk-filedialog-perl.

Show diffs side-by-side

added added

removed removed

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