| 1 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | |||||||||||
| 4 | 1 | ▶ | use Search::Fzf::AlgoCpp; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Test::More tests => 2; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | open my $fileH, "<t/testfile"; | |||||||||
| 8 | |||||||||||
| 9 | 1 | my $tac = 0; | |||||||||
| 10 | 1 | my $caseInsensitive = 0; | |||||||||
| 11 | 1 | my $nth = 0; | |||||||||
| 12 | 1 | my @filter = (); | |||||||||
| 13 | 1 | my $delim = ""; | |||||||||
| 14 | 1 | my $headerLines = 2; | |||||||||
| 15 | 1 | my $algo = Search::Fzf::AlgoCpp->newAlgoCpp($tac, $caseInsensitive, $headerLines, $nth, $delim, \@filter); | |||||||||
| 16 | 1 | $algo->asynRead($fileH); | |||||||||
| 17 | 1 | while(1) { | |||||||||
| 18 | 230 | ▶ | last if $algo->getReaderStatus() == 1; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | } | ||||||||||
| 20 | 1 | close $fileH; | |||||||||
| 21 | |||||||||||
| 22 | 1 | my $headerArr = $algo->getHeaderStr(); | |||||||||
| 23 | 1 | my $size = scalar(@{$headerArr}); | |||||||||
| 24 | 1 | ▶ | ok($size == 2, "test of getHeadStr.") || print "Bail out!\n"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | |||||||||||
| 26 | 1 | $algo->setMarkLabel(0); | |||||||||
| 27 | 1 | $algo->setMarkLabel(2); | |||||||||
| 28 | 1 | $algo->setMarkLabel(3); | |||||||||
| 29 | 1 | my $selectList = $algo->getMarkedStr(); | |||||||||
| 30 | 1 | $size = scalar(@{$selectList}); | |||||||||
| 31 | 1 | ▶ | ok($size == 3, "test of getMarkedStr.") || print "Bail out!\n"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | |||||||||||
| 33 | |||||||||||