7
7
8
8
subtest {
9
9
plan 4 ;
10
- eval_dies_ok (' use Pod::Convenience; first-code-block();' , " pod argument required" );
11
- eval_dies_ok (' use Pod::Convenience; first-code-block("moo");' , " array argument required" );
10
+ eval-dies-ok (' use Pod::Convenience; first-code-block();' , " pod argument required" );
11
+ eval-dies-ok (' use Pod::Convenience; first-code-block("moo");' , " array argument required" );
12
12
13
13
is (first-code-block([" text" ]), ' ' , " non-code POD returns empty string" );
14
14
@@ -22,9 +22,9 @@ subtest {
22
22
23
23
subtest {
24
24
plan 7 ;
25
- eval_dies_ok (' use Pod::Convenience; pod-with-title();' , " title argument required" );
25
+ eval-dies-ok (' use Pod::Convenience; pod-with-title();' , " title argument required" );
26
26
my $ pod = pod-with-title(" title text" );
27
- isa_ok ($ pod , Pod ::Block::Named);
27
+ isa-ok ($ pod , Pod ::Block::Named);
28
28
is ($ pod . name , " pod" , " block name correct" );
29
29
# XXX: why do we have to dig so far to get to the title here?
30
30
is ($ pod . contents[0 ]. contents[0 ]. contents[0 ], " title text" , " title matches input" );
@@ -44,23 +44,23 @@ subtest {
44
44
my $ title = " Pod document title" ;
45
45
my $ pod = pod-title($ title );
46
46
47
- isa_ok ($ pod , Pod ::Block::Named);
48
- eval_dies_ok (' use Pod::Convenience; pod-title()' , " title argument required" );
47
+ isa-ok ($ pod , Pod ::Block::Named);
48
+ eval-dies-ok (' use Pod::Convenience; pod-title()' , " title argument required" );
49
49
50
50
$ pod = pod-title(' ' );
51
51
ok ($ pod , " empty title is ok" );
52
52
53
53
$ pod = pod-title($ title );
54
54
is ($ pod . name , " TITLE" , " is a title element" );
55
55
56
- isa_ok ($ pod . contents, Array );
56
+ isa-ok ($ pod . contents, Array );
57
57
is ($ pod . contents[0 ]. contents, $ title , " title contents set correctly" );
58
58
}, " pod-title" ;
59
59
60
60
subtest {
61
61
plan 5 ;
62
62
my $ pod = pod-block(' ' );
63
- isa_ok ($ pod , Pod ::Block::Para);
63
+ isa-ok ($ pod , Pod ::Block::Para);
64
64
ok (pod-block(), " empty argument ok" );
65
65
66
66
$ pod = pod-block(" hello" );
@@ -75,11 +75,11 @@ subtest {
75
75
76
76
subtest {
77
77
plan 6 ;
78
- eval_dies_ok (' use Pod::Conenience; pod-link()' , " text argument required" );
79
- eval_dies_ok (' use Pod::Conenience; pod-link("text")' , " link argument required" );
78
+ eval-dies-ok (' use Pod::Conenience; pod-link()' , " text argument required" );
79
+ eval-dies-ok (' use Pod::Conenience; pod-link("text")' , " link argument required" );
80
80
81
81
my $ pod = pod-link(" text" , " link" );
82
- isa_ok ($ pod , Pod ::FormattingCode);
82
+ isa-ok ($ pod , Pod ::FormattingCode);
83
83
84
84
is ($ pod . type, " L" , " is a link type" );
85
85
is ($ pod . contents[0 ], " text" , " text matches input" );
@@ -88,10 +88,10 @@ subtest {
88
88
89
89
subtest {
90
90
plan 4 ;
91
- eval_dies_ok (' use Pod::Convenience; pod-bold()' , " text argument required" );
91
+ eval-dies-ok (' use Pod::Convenience; pod-bold()' , " text argument required" );
92
92
93
93
my $ pod = pod-bold(" text" );
94
- isa_ok ($ pod , Pod ::FormattingCode);
94
+ isa-ok ($ pod , Pod ::FormattingCode);
95
95
96
96
is ($ pod . type, " B" , " is a bold type" );
97
97
is ($ pod . contents[0 ], " text" , " text matches input" );
@@ -103,7 +103,7 @@ subtest {
103
103
ok (pod-item(' ' ), " empty string argument ok" );
104
104
105
105
my $ pod = pod-item(qw { hello there } );
106
- isa_ok ($ pod , Pod ::Item);
106
+ isa-ok ($ pod , Pod ::Item);
107
107
is ($ pod . level, 1 , " default level correct" );
108
108
is ($ pod . contents, " hello there" , " contents matches input" );
109
109
@@ -113,10 +113,10 @@ subtest {
113
113
114
114
subtest {
115
115
plan 6 ;
116
- eval_dies_ok (' use Pod::Convenience; pod-heading()' , " name argument required" );
116
+ eval-dies-ok (' use Pod::Convenience; pod-heading()' , " name argument required" );
117
117
118
118
my $ pod = pod-heading(" name" );
119
- isa_ok ($ pod , Pod ::Heading);
119
+ isa-ok ($ pod , Pod ::Heading);
120
120
is ($ pod . contents[0 ]. contents, " name" , " heading name matches input" );
121
121
is ($ pod . level, 1 , " level matches default value" );
122
122
@@ -127,23 +127,23 @@ subtest {
127
127
128
128
subtest {
129
129
plan 4 ;
130
- eval_dies_ok (' use Pod::Convenience; pod-table();' , " contents argument required" );
131
- eval_dies_ok (' use Pod::Convenience; pod-table("");' , " fails with empty string argument" );
130
+ eval-dies-ok (' use Pod::Convenience; pod-table();' , " contents argument required" );
131
+ eval-dies-ok (' use Pod::Convenience; pod-table("");' , " fails with empty string argument" );
132
132
133
133
my $ pod = pod-table(qw { table data } );
134
- isa_ok ($ pod , Pod ::Block::Table);
134
+ isa-ok ($ pod , Pod ::Block::Table);
135
135
is ($ pod . contents, " table data" , " table data matches input" );
136
136
}, " pod-table" ;
137
137
138
138
subtest {
139
- eval_dies_ok (' use Pod::Convenience; pod-lower-headings();' , " content argument required" );
139
+ eval-dies-ok (' use Pod::Convenience; pod-lower-headings();' , " content argument required" );
140
140
141
141
# should probably die, currently throws an internal error
142
- # eval_dies_ok ('use Pod::Convenience; pod-lower-headings(qw{foo bar});',
142
+ # eval-dies-ok ('use Pod::Convenience; pod-lower-headings(qw{foo bar});',
143
143
# "plain content array not acceptable");
144
144
145
145
my $ lowered-pod = pod-lower-headings([pod-heading(" A head 1 heading" )]);
146
- isa_ok ($ lowered-pod , Array );
146
+ isa-ok ($ lowered-pod , Array );
147
147
is ($ lowered-pod [0 ]. level, 1 , " single POD heading lowered from 1 to 1" );
148
148
is ($ lowered-pod [0 ]. contents[0 ]. contents, " A head 1 heading" , " lowered heading contents match input" );
149
149
0 commit comments