t/each_off_by_one.t

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod n/a totaltotal 100% 35 / 35 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« t/bind_data.t ↑ Summary
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 1 ▶use Test::More;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use Test::Mock::Simple;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use_ok 'XML::BindData';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 my $counter = 0;
10 1 my $mock = Test::Mock::Simple->new(module => 'XML::BindData');
11 1 ▶$mock->add('_get' => sub { $counter++; return []; });
Subroutine __ANON__: called CC=1 SCAR=0.0
12  
13 1 is(
14 XML::BindData->bind(
15 '<foo><bar tmpl-each="bar" tmpl-bind="this"/></foo>',
16 { bar => [ ] }
17 ),
18 '<foo></foo>'
19 );
20 1 is($counter, 1, 'Terminated correctly after each');
21  
22 1 done_testing;
« t/bind_data.t ↑ Summary