File: encod01.t

package info (click to toggle)
perl 5.40.1-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 126,152 kB
  • sloc: ansic: 668,539; perl: 525,522; sh: 72,038; pascal: 6,925; xml: 2,428; yacc: 1,410; makefile: 1,191; 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/ );