Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Adds another test for #55
  • Loading branch information
JJ committed Dec 14, 2018
1 parent 50502ca commit 4209c9a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 7 deletions.
23 changes: 16 additions & 7 deletions t/011-external.t
@@ -1,15 +1,24 @@
use Test; # -*- mode: perl6 -*-
use Pod::To::HTML;
plan 2;
plan 6;

use MONKEY-SEE-NO-EVAL;

# XXX Need a module to walk HTML trees

my $example-path = "test.pod6".IO.e??"test.pod6"!!"t/test.pod6";
for <test class> -> $base {
test-files( $base ~ ".pod6" );
}

my $a-pod = $example-path.IO.slurp;
my $pod = (EVAL ($a-pod ~ "\n\$=pod")); # use proved pod2onebigpage method
my $r = node2html $pod;
ok( $r, "Converting external" );
unlike( $r, /Pod\:\:To/, "Is not prepending class name" );
sub test-files( $possible-file-path ) {

my $example-path = $possible-file-path.IO.e??$possible-file-path!!"t/$possible-file-path";

my $a-pod = $example-path.IO.slurp;
my $pod = (EVAL ($a-pod ~ "\n\$=pod")); # use proved pod2onebigpage method
my $r = node2html $pod;
ok( $r, "Converting external" );
unlike( $r, /Pod\:\:To/, "Is not prepending class name" );
$r = pod2html($pod, :header(''), :footer(''), :head(''), :default-title(''), :lang('en'));
unlike( $r, /Pod\:\:To/, "Is not prepending class name" );
}
2 changes: 2 additions & 0 deletions t/class.pod6
@@ -0,0 +1,2 @@
#| Hello!
class XYZ {}

0 comments on commit 4209c9a

Please sign in to comment.