File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,21 @@ use Test;
3
3
use lib ' lib' ;
4
4
use Pod ::Convenience;
5
5
6
- plan 9 ;
6
+ plan 10 ;
7
+
8
+ subtest {
9
+ eval_dies_ok(' use Pod::Convenience; first-code-block();' , " pod argument required" );
10
+ eval_dies_ok(' use Pod::Convenience; first-code-block("moo");' , " array argument required" );
11
+
12
+ is (first-code-block([" text" ]), ' ' , " non-code POD returns empty string" );
13
+
14
+ my @ code-blocks ;
15
+ @ code-blocks . push (Pod ::Block::Code. new (contents => [' my $first-block' ]));
16
+ @ code-blocks . push (Pod ::Block::Code. new (contents => [' my @second-block' ]));
17
+
18
+ # XXX: why does this return the *second* block??
19
+ is (first-code-block(@ code-blocks ), ' my @second-block' , " first code block returned" );
20
+ }, " first-code-block" ;
7
21
8
22
subtest {
9
23
plan 7 ;
You can’t perform that action at this time.
0 commit comments