Branch Coverage

blib/lib/Device/Gsm.pm
Criterion Covered Total %
branch 0 200 0.0


line true false branch
118 0 0 if @_
162 0 0 if ($self->test_command('+CCLK'))
164 0 0 if (@_) { }
167 0 0 if (@_ == 1) { }
191 0 0 $ok ? :
205 0 0 if ($ok and $datetime =~ m[\+CCLK:\s*"?(\d\d)/(\d\d)/(\d\d)\,(\d\d):(\d\d):(\d\d)"?]) { }
241 0 0 if (not defined $msg_index or $msg_index eq '')
255 0 0 if (index($ans, 'OK') > -1 or $ans =~ /\+CMGD/)
260 0 0 $ok ? :
333 0 0 if ($ok ne 'OK')
345 0 0 if ($man =~ /\+CGMI:\ \"(.*)\"/s)
363 0 0 if (@_)
365 0 0 if ($mode eq 'text') { }
371 0 0 $mode ? :
393 0 0 if ($self->test_command('+CGMM'))
416 0 0 if ($self->test_command('+CGSN'))
440 0 0 if ($self->test_command('+CSQ')) { }
450 0 0 if (/\+CSQ:/)
457 0 0 if ($dBm =~ /\+CSQ:\s*(\d+),(\d+)/) { }
0 0 elsif ($dBm =~ /\+CSQ:\s*(\d+)/) { }
462 0 0 if ($dBm > 30) { }
511 0 0 if ($self->test_command('+CGMR'))
529 0 0 unless (exists $self->{'_test_cache'})
530 0 0 if (exists $self->{'_test_cache'}{$command})
536 0 0 if ($command =~ /^[a-zA-Z]/)
549 0 0 $ok ? :
568 0 0 $storage eq 'SM' ? :
578 0 0 if ($self->mode eq 'text') { }
599 0 0 if (@_ and my $storage = uc $_[0])
600 0 0 unless $self->test_command('+CPMS')
619 0 0 unless ($me->{'CONNECTED'})
621 0 0 unless ($me->connect)
629 0 0 if (exists $me->{'assume_registered'} and $me->{'assume_registered'})
640 0 0 if (not defined $cReply or $cReply eq '')
646 0 0 if ($cReply =~ /(READY|SIM PIN2)/) { }
0 0 elsif ($cReply =~ /SIM PIN/) { }
667 0 0 if (not $cReply =~ /ERROR/) { }
698 0 0 unless $opt{'recipient'} and $opt{'content'}
701 0 0 unless ($me->{'REGISTERED'})
710 0 0 unless ($me->{'REGISTERED'})
719 0 0 if (uc $opt{'mode'} ne 'TEXT') { }
730 0 0 wantarray ? :
746 0 0 unless $opt{'recipient'} and $opt{'content'}
749 0 0 unless ($me->{'REGISTERED'})
758 0 0 unless ($me->{'REGISTERED'})
768 0 0 if (uc $opt{'mode'} eq 'TEXT')
771 0 0 unless $me->mode('pdu')
777 0 0 if (Device::Gsm::Charset::gsm0338_length($opt{'content'}) <= 160) { }
779 0 0 if ($send_return[0]) { }
810 0 0 if ($send_return[0]) { }
825 0 0 wantarray ? :
856 0 0 if (($code = pop @data) =~ /ERROR/)
890 0 0 if (ref $msg) { }
920 0 0 unless $num and $text
942 0 0 if ($cReply =~ /OK$/i) { }
952 0 0 wantarray ? :
965 0 0 unless $num and $text
972 0 0 $class eq 'normal' ? :
981 0 0 if (defined $opt{'validity_period'})
987 0 0 if (exists $opt{'status_report'} and $opt{'status_report'})
1011 0 0 unless $is_gsm0338
1019 0 0 $status_report ? :
1055 0 0 if ($cReply =~ /OK$/i) { }
1067 0 0 wantarray ? :
1078 0 0 unless $num and $text and $pdu_msg
1085 0 0 $class eq 'normal' ? :
1094 0 0 if (defined $opt{'validity_period'})
1100 0 0 if (exists $opt{'status_report'} and $opt{'status_report'})
1132 0 0 $status_report ? :
1179 0 0 if ($cReply =~ /OK$/i) { }
1190 0 0 wantarray ? :
1204 0 0 if (@_) { }
1216 0 0 if ($lOk) { }
1238 0 0 if ($code =~ /ERROR/) { }
1278 0 0 if ($ans =~ /"([^"]*)"/) { }
1289 0 0 if (not defined $netname or $netname eq 'unknown')
1293 0 0 wantarray ? :
1305 0 0 if ($self->test_command('CNUM'))
1310 0 0 if ($_ =~ /^\+CNUM: /)
1313 0 0 if ($temp[1] =~ /\d{9,}/)
1314 0 0 unless $selfnum
1319 0 0 if ($selfnum) { }
1323 0 0 wantarray ? :
1346 0 0 if ($self->answer($Device::Modem::STD_RESPONSE) =~ /OK/) { }
1354 0 0 if $self->answer($Device::Modem::STD_RESPONSE) =~ /OK/
1360 0 0 if ($ans =~ /\+MMGR:/)
1367 0 0 unless $self->answer($Device::Modem::STD_RESPONSE) =~ /OK/ and $self->log->write('warning', 'PDU mode Set')
1377 0 0 if ($self->test_command('CUSD')) { }
1388 0 0 if $response =~ /OK/
1391 0 0 if ($response =~ /OK/) { }
1399 0 0 if ($response =~ /\+CUSD:\s*(\d+)\s*,/)
1405 0 0 if ($response_code < 2) { }
0 0 elsif ($response_code == 2) { }
1406 0 0 if ($response =~ /\s*\"?([0-9A-F]+)\"?\s*,\s*(\d*)\s*/)
1408 0 0 length $2 ? :
1412 0 0 if $ussd_dcs == 15 || $ussd_dcs == 0 and $answer = Device::Gsm::Pdu::decode_text7_ussd($ussd_response)
1417 0 0 if $ussd_dcs == 72 and $answer = Device::Gsm::Pdu::decode_text_UCS2($ussd_response)
1422 0 0 if $ussd_dcs == 68 and $answer = &Device::Gsm::Pdu::decode_text8($ussd_response)
1426 0 0 if $ussd_dcs != -1
1438 0 0 if $response =~ /\s*(\d+)\s*/