• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

gugod / App-perlbrew / 10624839896

30 Aug 2024 12:47AM UTC coverage: 80.187% (+0.4%) from 79.799%
10624839896

push

github

3165 of 3947 relevant lines covered (80.19%)

81.25 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.0
/t/failure-command-install-patchperl.t
1
#!/usr/bin/env perl
2
use Test2::V0;
1✔
3
use Test2::Tools::Spec;
1✔
4
use Path::Class;
1✔
5
use File::Temp qw( tempdir );
1✔
6

7
use App::perlbrew;
1✔
8
$App::perlbrew::PERLBREW_ROOT = my $perlbrew_root = tempdir( CLEANUP => 1 );
×
9
$App::perlbrew::PERLBREW_HOME = my $perlbrew_home = tempdir( CLEANUP => 1 );
×
10

11
{
12
    no warnings 'redefine';
1✔
13
    sub App::perlbrew::http_get {
14
        my ($url) = @_;
1✔
15
        like $url, qr/patchperl$/, "GET patchperl url: $url";
1✔
16
        return "Some invalid piece of text";
1✔
17
    }
18
}
19

20
describe "App::perlbrew->install_patchperl" => sub {
×
21
    it "should not produce 'patchperl' in the bin dir, if the downloaded content does not seem to be valid." => sub {
22
        my $patchperl = file($perlbrew_root, "bin", "patchperl")->absolute;
×
23

24
        my $error;
1✔
25
        my $produced_error = 0;
1✔
26
        eval {
27
            my $app = App::perlbrew->new("install-patchperl", "-q");
1✔
28
            $app->run();
1✔
29
        } or do {
1✔
30
            $error = $@;
1✔
31
            $produced_error = 1;
1✔
32
        };
33

34
        ok $produced_error, "generated an error: $error";
1✔
35
        ok !(-f $patchperl), "patchperl is *not* installed: $patchperl";
1✔
36
    };
1✔
37
};
1✔
38

39
done_testing;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc