File Coverage

lib/Rex/Test/Base/has_output.pm
Criterion Covered Total %
statement 14 23 60.8
branch n/a
condition 0 3 0.0
subroutine 5 7 71.4
pod 1 2 50.0
total 20 35 57.1


line stmt bran cond sub pod time code
1             #
2             # (c) Jan Gehring
3             #
4              
5             package Rex::Test::Base::has_output;
6              
7 1     1   14 use v5.12.5;
  1         4  
8 1     1   5 use warnings;
  1         2  
  1         59  
9              
10             our $VERSION = '1.14.2.2'; # TRIAL VERSION
11              
12 1     1   7 use Rex -minimal;
  1         2  
  1         5  
13 1     1   6 use Rex::Helper::Run;
  1         3  
  1         60  
14 1     1   8 use base qw(Rex::Test::Base);
  1         1  
  1         221  
15              
16             sub new {
17 0     0 1   my $that = shift;
18 0   0       my $proto = ref($that) || $that;
19 0           my $self = {@_};
20              
21 0           bless( $self, $proto );
22              
23 0           my ( $pkg, $file ) = caller(0);
24              
25 0           return $self;
26             }
27              
28             sub run_test {
29 0     0 0   my ( $self, $exec, $wanted_output ) = @_;
30 0           my $output = i_exec $exec;
31 0           $self->ok( $output eq $wanted_output, "Output of $exec is as expected." );
32             }
33              
34             1;