File: encod01.t

package info (click to toggle)
perl 5.42.0-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 128,392 kB
  • sloc: perl: 534,963; ansic: 240,563; sh: 72,042; pascal: 6,934; xml: 2,428; yacc: 1,360; makefile: 1,197; cpp: 208; lisp: 1
file content (37 lines) | stat: -rw-r--r-- 821 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# encoding nonesuch
use strict;
use warnings;

use Test::More tests => 5;
use File::Spec;

#use Pod::Simple::Debug (10);

use Pod::Simple;
use Pod::Simple::DumpAsXML;

my $thefile;

use File::Spec;
use Cwd ();
use File::Basename ();

BEGIN {
  my $corpusdir = File::Spec->catdir(File::Basename::dirname(Cwd::abs_path(__FILE__)), 'corpus');
  $thefile = File::Spec->catfile($corpusdir, 'nonesuch.txt');
}

print "# Testing that $thefile parses right.\n";
my $outstring;
{
  my $p = Pod::Simple::DumpAsXML->new;
  $p->output_string( \$outstring );
  $p->parse_file( $thefile );
  undef $p;
}
ok 1 ; # make sure it parsed at all
ok( $outstring && length($outstring) ); # make sure it parsed to something.
#print $outstring;
like( $outstring, qr/Blorp/ );
like( $outstring, qr/errata/ );
like( $outstring, qr/unsupported/ );