File Coverage: t/main.t

# File Coverage

File: | t/main.t
Coverage: | 100.0%

line | stmt | bran | cond | sub | time | code
--- | --- | --- | --- | --- | --- | ---
1 | 3 3 3 |  |  | 3 | 6701 27063 14 | use Test::More;
2 | 3 3 3 |  |  | 3 | 1169 149684 58 | use PPI;
3 | 3 3 3 |  |  | 3 | 755 10217 109 | use Data::Dumper;
4 | 3 3 3 |  |  | 3 | 509 2630433 84 | use Pod::Weaver;
5 | 3 3 3 |  |  | 3 | 674 1123 9 | use lib qw(t/inc);
6 |
7 |  |  |  |  |  | # Make some 'test' documents..
8 | 3 |  |  |  | 374551 | my $doc = new_ok( 'PPI::Document', ['t/inc/Tester.pm']);
9 | 3 |  |  |  | 21776 | my $weaver;
10 | 3 |  |  |  | 24 | ok( $weaver = Pod::Weaver->new_from_config({ root => 't'}) );
11 | 2 |  |  |  | 3781 | ok( my $document = $weaver->weave_document({
12 |  |  |  |  |  | ppi_document => $doc,
13 |  |  |  |  |  | mopper => { },
14 |  |  |  |  |  | authors => ['Bob MctestAthor']
15 |  |  |  |  |  | }), 'Weaving document..');
16 |
17 | 2 |  |  |  | 15050 | my $expected = <<HERE;
18 - 60 |  |
    =pod

    =head1 NAME

    Tester

    =head1 ATTRIBUTES

    =head2 testattr1

    Reader: testattr1

    Writer: testattr1

    Type: Str

    =head2 testattr2

    Reader: testattr2

    Type: Num

    Additional documentation: This is a documentation option test.  It is a string.  With some L<links>

    =head1 METHODS

    =head2 method1

    Method originates in Tester.

    =head2 testattr1

    Method originates in Tester.

    =head2 testattr2

    Method originates in Tester.

    =head1 AUTHOR

    Bob MctestAthor

    =cut
61 |  |  |  |  |  | HERE
62 |
63 | 2 |  |  |  | 9 | is( $document->as_pod_string, $expected, 'Did it work?');
64 |
65 | 2 |  |  |  | 305 | done_testing;