summaryrefslogtreecommitdiffstats
path: root/t/01-basic.t
diff options
context:
space:
mode:
Diffstat (limited to 't/01-basic.t')
-rw-r--r--t/01-basic.t44
1 files changed, 44 insertions, 0 deletions
diff --git a/t/01-basic.t b/t/01-basic.t
new file mode 100644
index 0000000..1917f3a
--- /dev/null
+++ b/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;