9 #use Pod::Simple::Debug (10);
14 #use Pod::Simple::Debug (10);
16 BEGIN { plan tests => 6 }
19 use Pod::Simple::DumpAsXML;
26 # Find the path to the test source files. This requires some fiddling when
27 # these tests are run as part of Perl core.
30 if ($ENV{PERL_CORE}) {
32 my $updir = File::Spec->updir;
33 my $dir = File::Spec->catdir ($updir, 'lib', 'Pod', 'Simple', 't', 'corpus');
34 return File::Spec->catfile ($dir, $file);
40 ($thefile = source_path('nonesuch.txt'))
41 #or (print("# Nope, not $thefile\n"), 0)
46 ($thefile = File::Spec::->catfile( File::Spec::->curdir, 'corpus', 'nonesuch.txt' ))
47 #or (print("# Nope, not $thefile\n"), 0)
51 ($thefile = File::Spec::->catfile( File::Spec::->curdir, 't', 'corpus', 'nonesuch.txt' ))
52 #or (print("# Nope, not $thefile\n"), 0)
56 die "Can't find the corpus directory\n Aborting";
61 print "# Testing that $thefile parses right.\n";
64 my $p = Pod::Simple::DumpAsXML->new;
65 $p->output_string( \$outstring );
66 $p->parse_file( $thefile );
69 ok 1 ; # make sure it parsed at all
70 ok( $outstring && length($outstring) ); # make sure it parsed to something.
72 ok( $outstring =~ m/Blorp/ );
73 ok( $outstring =~ m/errata/ );
74 ok( $outstring =~ m/unsupported/ );