Skip to content

Commit f9d2442

Browse files
committed
first-code-block now always returns the 1st block.
Before it returned the second because it was only checking 2nd position.
1 parent 7df7c77 commit f9d2442

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

t/pod-convenience.t

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use Pod::Convenience;
66
plan 10;
77

88
subtest {
9-
plan 4;
109
eval-dies-ok('use Pod::Convenience; first-code-block();', "pod argument required");
1110
eval-dies-ok('use Pod::Convenience; first-code-block("moo");', "array argument required");
1211

@@ -16,8 +15,7 @@ subtest {
1615
@code-blocks.push(Pod::Block::Code.new(contents => ['my $first-block']));
1716
@code-blocks.push(Pod::Block::Code.new(contents => ['my @second-block']));
1817

19-
# XXX: why does this return the *second* block??
20-
is(first-code-block(@code-blocks), 'my @second-block', "first code block returned");
18+
is(first-code-block(@code-blocks), 'my $first-block', "first code block returned");
2119
}, "first-code-block";
2220

2321
subtest {

0 commit comments

Comments
 (0)