« blib/lib/App/RecordStream/Aggregator/Minimum.pm
↑ Summary
blib/lib/App/RecordStream/Clumper/KeyPerfect.pm »
| 1 | package App::RecordStream::Test::Tester; | ||||||||||
| 2 | |||||||||||
| 3 | 8 | our $VERSION = "4.0.23"; | |||||||||
| 4 | |||||||||||
| 5 | 8 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 8 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 8 | ▶ | use App::RecordStream::Test::OperationHelper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | sub new { | ||||||||||
| 11 | 7 | ▶ | my $class = shift; | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 12 | 7 | my $operation = shift; | |||||||||
| 13 | |||||||||||
| 14 | 7 | my $this = { | |||||||||
| 15 | OPERATION => $operation, | ||||||||||
| 16 | }; | ||||||||||
| 17 | |||||||||||
| 18 | 7 | bless $this, $class; | |||||||||
| 19 | 7 | return $this; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | sub no_input_test { | ||||||||||
| 23 | 3 | ▶ | my $this = shift; | ||||||||
|
Subroutine
no_input_test: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 24 | 3 | my $args = shift; | |||||||||
| 25 | 3 | my $output = shift; | |||||||||
| 26 | |||||||||||
| 27 | return App::RecordStream::Test::OperationHelper->do_match( | ||||||||||
| 28 | 3 | $this->{'OPERATION'}, | |||||||||
| 29 | $args, | ||||||||||
| 30 | undef, | ||||||||||
| 31 | $output, | ||||||||||
| 32 | ); | ||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | sub test_input { | ||||||||||
| 36 | 16 | ▶ | my $this = shift; | ||||||||
|
Subroutine
test_input: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 37 | 16 | my $args = shift; | |||||||||
| 38 | 16 | my $input = shift; | |||||||||
| 39 | 16 | my $output = shift; | |||||||||
| 40 | |||||||||||
| 41 | return App::RecordStream::Test::OperationHelper->do_match( | ||||||||||
| 42 | 16 | $this->{'OPERATION'}, | |||||||||
| 43 | $args, | ||||||||||
| 44 | ['LINES', split(/\n/, $input)], | ||||||||||
| 45 | $output, | ||||||||||
| 46 | ); | ||||||||||
| 47 | } | ||||||||||
| 48 | |||||||||||
| 49 | sub test_stdin { | ||||||||||
| 50 | 14 | ▶ | my $this = shift; | ||||||||
|
Subroutine
test_stdin: called CC=3 SCAR=11.2
Pod
undocumented
| |||||||||||
| 51 | 14 | my $args = shift; | |||||||||
| 52 | 14 | my $input = shift; | |||||||||
| 53 | 14 | my $output = shift; | |||||||||
| 54 | |||||||||||
| 55 | # Re-open stdin to the given input | ||||||||||
| 56 | 14 | ▶ | close(STDIN) or die "Cannot close STDIN: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | 14 | ▶ | open(STDIN, "<", \$input) or die "Cannot re-open STDIN to string ref: $!"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 58 | |||||||||||
| 59 | return App::RecordStream::Test::OperationHelper->do_match( | ||||||||||
| 60 | 14 | $this->{'OPERATION'}, | |||||||||
| 61 | $args, | ||||||||||
| 62 | undef, | ||||||||||
| 63 | $output, | ||||||||||
| 64 | ); | ||||||||||
| 65 | } | ||||||||||
| 66 | |||||||||||
| 67 | 8 | 1; | |||||||||