t/Templates/Plugins/check_dummy.t

filter: Statementstmt 96.7% 30 / 31 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod n/a totaltotal 92.6% 38 / 41 CC 1 SCAR 0.0
CC
1
Cov
91%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« t/Templates/Plugins/XML/check_template-XML.t ↑ Summary t/Templates/Plugins/Nagios/check_xml-monitoring.t »
1 #!/usr/bin/env perl -w -I ..
2 #
3 # ... Tests via check_dummy.pl
4 #
5 # $Id: check_dummy.t, v 1.0 2006/02/01 Alex Peeters Exp $
6 #
7  
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use Test;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use ASNMTAP::Asnmtap::Plugins::NPTest;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 ▶use vars qw($tests);
Subroutine BEGIN: called CC=1 SCAR=0.0
13 1 ▶BEGIN {$tests = 8; plan tests => $tests}
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 1 my $t;
16 1 my $prefix = '../plugins/templates';
17 1 my $plugin = 'check_dummy.pl';
18  
19 1 ▶if ( -x "$prefix/$plugin" ) {
Branch: 1 branch
BranchTrueFalseTotal
if (-x "$prefix/$plugin") { } 1 0 1
20 1 $t += checkCmd( "$prefix/$plugin -V", 3, "/$plugin/");
21 1 $t += checkCmd( "$prefix/$plugin -h", 3);
22 1 $t += checkCmd( "$prefix/$plugin -r 0", 0);
23 1 $t += checkCmd( "$prefix/$plugin -r 1", 1);
24 1 $t += checkCmd( "$prefix/$plugin -r 2", 2);
25 1 $t += checkCmd( "$prefix/$plugin -r 3", 3);
26 1 $t += checkCmd( "$prefix/$plugin -r 4", 3);
27 } else {
28 0 $t += skipMissingCmd( "$prefix/$plugin", $tests );
29 }
30  
31 1 ▶exit(0) if defined($Test::Harness::VERSION);
Branch: 1 branch
BranchTrueFalseTotal
if defined $Test::Harness::VERSION 0 1 1
32 1 exit($tests - $t);
« t/Templates/Plugins/XML/check_template-XML.t ↑ Summary t/Templates/Plugins/Nagios/check_xml-monitoring.t »