blib/lib/Mock/Data/Regex.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
condition | 65 | 120 | 54.1 |
line | !l | l&&!r | l&&r | condition |
---|---|---|---|---|
20 | 2 | 0 | 20 | @_ == 1 && (!ref($_[0]) || ref $_[0] eq 'Regexp') |
86 | 0 | 96 | 109 | $self->regex_parse_tree->generate($out) and !$out->next_req || grep(($_ eq ''), @{$out->next_req;}) |
95 | 0 | 13 | 6 | $prefix and !$out->start || $out->start eq 'LF' |
102 | 0 | 12 | 7 | $suffix and !$out->next_req || grep(($_ eq "\n"), @{$out->next_req;}) && !$out->require->[1] |
118 | 0 | 0 | 0 | &Scalar::Util::blessed($p) && $p->isa('Mock::Data::Charset') |
140 | 0 | 0 | 0 | $] < 5.02 and /\G (\w*)-\w* : /cgx |
156 | 115 | 0 | 0 | $flags->{'x'} and /\G ( \s | [#].* ) /cgx |
232 | 69 | 1 | 5 | $1 and defined(my $equiv = $_parse_regex_backslash{$2}) |
237 | 72 | 0 | 3 | $flags->{'i'} and uc $ch ne lc $ch |
37 | 13 | 22 | @$expr and not ref $expr->[-1] | |
314 | 0 | 0 | 0 | defined $rep->[$_] && defined $val->[$_] |
338 | 19 | 19 | 326 | $success &&= ref $_ ? $_->generate($out) : $out->append($_) |
427 | 0 | 0 | 0 | length $_ == 0 and $self->min_repetition == 0 |
428 | 0 | 0 | 0 | length $_ == 1 and $self->pattern->has_member($_) |
0 | 0 | 0 | length $_ > 1 and not grep((!$self->pattern->has_member($_)), split(//, $_, 0)) | |
455 | 0 | 23 | 14 | $self->{'start'} eq 'LF' and substr($out->str, -1) eq "\n" |
458 | 14 | 0 | 19 | length $out->str == 0 and not $out->start |
508 | 912 | 105 | 0 | $_[0]{'require'} && $_[0]{'require'}[0] |
518 | 19 | 19 | 0 | length $_ and $content eq $_ |
line | l | !l | condition |
---|---|---|---|
38 | 1 | 2 | $self{'max_codepoint'} //= 127 |
131 | 91 | 0 | shift() || {} |
205 | 2 | 1 | $2 || 0 |
2 | 0 | $2 || 0 | |
230 | 6 | 69 | $1 or '' |
482 | 0 | 205 | $self->{'str'} //= '' |
496 | 122 | 0 | $self->opts->{'max_repetition'} // '+8' |
line | l | !l&&r | !l&&!r | condition |
---|---|---|---|---|
37 | 0 | 22 | 0 | $self{'regex_parse_tree'} ||= $class->parse($self{'regex'}) |
40 | 0 | 0 | 0 | $self{'prefix'} //= Mock::Data::Util::coerce_generator($self{'prefix'}) |
41 | 0 | 0 | 0 | $self{'suffix'} //= Mock::Data::Util::coerce_generator($self{'suffix'}) |
80 | 2 | 24 | 179 | $opts{'max_codepoint'} //= $self->max_codepoint |
81 | 2 | 4 | 199 | $opts{'min_codepoint'} //= $self->min_codepoint |
82 | 0 | 205 | 0 | $opts{'max_repetition'} //= $self->max_repetition |
86 | 166 | 39 | 0 | !$out->next_req || grep(($_ eq ''), @{$out->next_req;}) |
88 | 19 | 0 | 186 | $opts{'prefix'} // $self->{'prefix'} |
89 | 19 | 0 | 186 | $opts{'suffix'} // $self->{'suffix'} |
90 | 19 | 0 | 186 | defined $prefix or defined $suffix |
95 | 18 | 1 | 0 | !$out->start || $out->start eq 'LF' |
102 | 16 | 2 | 1 | !$out->next_req || grep(($_ eq "\n"), @{$out->next_req;}) && !$out->require->[1] |
251 | 25 | 10 | 53 | @$expr > 1 || !ref($expr->[0]) |
428 | 0 | 0 | 0 | length $_ == 1 and $self->pattern->has_member($_) or length $_ > 1 and not grep((!$self->pattern->has_member($_)), split(//, $_, 0)) |
455 | 19 | 14 | 23 | length $out->str == 0 or $self->{'start'} eq 'LF' and substr($out->str, -1) eq "\n" |
line | l&&r | l&&!r | !l&&r | !l&&!r | condition |
---|---|---|---|---|---|
27 | 0 | 0 | 0 | 0 | $self{'regex'} == $class->{'regex'} xor $self{'regex_parse_tree'} == $class->{'regex_parse_tree'} |