Skip to content

Commit

Permalink
add basic test
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed Jun 13, 2010
1 parent 64af885 commit 3cdbd3b
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
44 changes: 44 additions & 0 deletions t/01-basic.t
@@ -0,0 +1,44 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;

use FindBin;
use Pod::Elemental;
use Pod::Weaver;

my $weaver = Pod::Weaver->new_from_config({root => "$FindBin::Bin/01"});

my $doc = Pod::Elemental->read_string(<<'POD');
=head1 BEGINNING
start of pod
=head1 ENDING
end of pod
=cut
POD

my $woven = $weaver->weave_document({pod_document => $doc});

is($woven->as_pod_string, <<'POD', "got the right pod");
=pod
=head1 BEGINNING
start of pod
=head1 TEMPLATE
got template with parameter FOO
=head1 ENDING
end of pod
=cut
POD

done_testing;
1 change: 1 addition & 0 deletions t/01/template.section
@@ -0,0 +1 @@
got template with parameter {{ $foo }}
9 changes: 9 additions & 0 deletions t/01/weaver.ini
@@ -0,0 +1,9 @@
[@CorePrep]

[Generic / BEGINNING]

[Template / TEMPLATE]
template = t/01/template.section
foo = FOO

[Generic / ENDING]

0 comments on commit 3cdbd3b

Please sign in to comment.