File: 17.release-detail-cperl-remote.t

package info (click to toggle)
perlbrew 0.78-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 708 kB
  • sloc: perl: 6,291; makefile: 6
file content (26 lines) | stat: -rw-r--r-- 763 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!perl
use strict;
use App::perlbrew;
use File::Temp qw( tempdir );
$App::perlbrew::PERLBREW_ROOT = tempdir( CLEANUP => 1 );
$App::perlbrew::PERLBREW_HOME = tempdir( CLEANUP => 1 );
$ENV{PERLBREW_ROOT} = $App::perlbrew::PERLBREW_ROOT;

use Test::More;

unless ($ENV{TEST_LIVE}) {
    plan skip_all => 'These tests send HTTP requests. Set env TEST_LIVE=1 to really run them.';
}

my $app = App::perlbrew->new();

my $rd = { type => "cperl", "version" => "5.24.0" };
$app->release_detail_cperl_remote("cperl-5.24.0", $rd);

ok defined( $rd->{tarball_url} );
ok defined( $rd->{tarball_name} );

is $rd->{tarball_url}, "https://github.com/perl11/cperl/releases/download/cperl-5.24.0/cperl-5.24.0.tar.gz";
is $rd->{tarball_name}, "cperl-5.24.0.tar.gz";

done_testing;