File Coverage

blib/lib/OTRS/OPM/Maker/Command/dbtest.pm
Criterion Covered Total %
statement 14 14 100.0
branch 2 2 100.0
condition 12 12 100.0
subroutine 7 7 100.0
pod 4 4 100.0
total 39 39 100.0


line stmt bran cond sub pod time code
1             package OTRS::OPM::Maker::Command::dbtest;
2              
3             # ABSTRACT: Test db definitions in .sopm files
4              
5 13     13   10383 use strict;
  13         34  
  13         416  
6 13     13   89 use warnings;
  13         28  
  13         432  
7              
8 13     13   478 use OTRS::OPM::Maker -command;
  13         79  
  13         113  
9              
10             our $VERSION = '0.17';
11              
12             sub abstract {
13 1     1 1 3615 return "Check if DatabaseInstall and DatabaseUninstall sections in the .sopm are correct";
14             }
15              
16             sub usage_desc {
17 1     1 1 901 return "opmbuild dbtest ";
18             }
19              
20             sub validate_args {
21 8     8 1 8393 my ($self, $opt, $args) = @_;
22              
23 8 100 100     136 $self->usage_error( 'need path to .sopm' ) if
      100        
      100        
      100        
24             !$args or
25             'ARRAY' ne ref $args or
26             !defined $args->[0] or
27             $args->[0] !~ /\.sopm\z/ or
28             !-f $args->[0];
29             }
30              
31             sub execute {
32 1     1 1 682 my ($self, $opt, $args) = @_;
33             }
34              
35             1;
36              
37             __END__