Lines Matching full:parser
9 use TAP::Parser;
11 my $plan_line = 'TAP::Parser::Result::Plan';
12 my $test_line = 'TAP::Parser::Result::Test';
15 my $parser = TAP::Parser->new( { tap => shift } );
16 $parser->run;
17 return $parser;
22 my $parser = _parser(<<'END_TAP');
30 can_ok $parser, 'parse_errors';
31 ok !$parser->parse_errors,
34 $parser = _parser(<<'END_TAP');
43 can_ok $parser, 'parse_errors';
44 is scalar $parser->parse_errors, 2, '... and we should have two parse errors';
46 is [ $parser->parse_errors ]->[0],
49 is [ $parser->parse_errors ]->[1],
53 $parser = _parser(<<'END_TAP');
61 ok !$parser->parse_errors, '... but test plan-like data can be in a comment';
63 $parser = _parser(<<'END_TAP');
70 ok !$parser->parse_errors, '... or a description';
72 $parser = _parser(<<'END_TAP');
79 ok !$parser->parse_errors, '... or a directive';
83 $parser = _parser(<<'END_TAP');
90 eval { $parser->run };
93 $parser = _parser(<<'END_TAP');
100 is + ( $parser->parse_errors )[0],
104 $parser = _parser(<<'END_TAP');
110 is $parser->parse_errors, 2,
116 is_deeply [ $parser->parse_errors ], $expected,
119 $parser = _parser(<<'END_TAP');
125 is $parser->parse_errors, 1, 'Having no plan should cause an error';
126 is + ( $parser->parse_errors )[0], 'No plan found in TAP output',
129 $parser = _parser(<<'END_TAP');
137 is $parser->parse_errors, 1,
139 is + ( $parser->parse_errors )[0], 'More than one plan found in TAP output',
142 can_ok $parser, 'is_good_plan';
143 $parser = _parser(<<'END_TAP');
150 is $parser->parse_errors, 1,
152 is + ( $parser->parse_errors )[0],
157 $parser->is_good_plan(undef);
158 $parser = _parser(<<'END_TAP');
163 ok $parser->is_good_plan,
166 # TAP::Parser coverage tests
176 $parser->good_plan;