Skip to content

Commit

Permalink
Force dep installs during travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
toddr committed Mar 27, 2018
1 parent 9b5e4b8 commit 450021f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
language: perl
sudo: false
perl:
- 5.8.1
- 5.8.3
Expand All @@ -12,11 +13,16 @@ perl:
- 5.16.3
- 5.18.4
- 5.20.3
- 5.22.1
- 5.22.3
- 5.24.2
- 5.26.1
before_install:
- git clone git://github.com/haarg/perl-travis-helper
- source perl-travis-helper/init
- eval $(curl https://travis-perl.github.io/init) --auto
- build-perl
- perl -V
- build-dist
- cd $BUILD_DIR
install:
- export AUTOMATED_TESTING=1 HARNESS_TIMER=1 AUTHOR_TESTING=0 RELEASE_TESTING=0
- cpanm --quiet --installdeps --notest .
- cpanm --quiet --installdeps --with-develop --notest . || /bin/true
5 changes: 5 additions & 0 deletions cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
requires 'IO::Pty';
on 'develop' => sub {
requires 'Readonly';
};

13 changes: 11 additions & 2 deletions t/readonly.t
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,24 @@ use strict;
use warnings;

use IPC::Run 'run';
use Test::More qw( no_plan );
use Readonly;
use Test::More;

$] > 5.014 or plan skip_all => q{IPC::Run doesn't support Readonly below 5.14};

BEGIN {
eval 'use Readonly';
$INC{'Readonly.pm'} or plan skip_all => "Readonly is require for this test to work.";
}

my @lowercase = 'a' .. 'c';
Readonly::Array my @UPPERCASE => 'A' .. 'C';
Readonly my @MIXEDCASE => qw( X y Z );

run_echo($_) for ( @lowercase, @UPPERCASE, @MIXEDCASE );

done_testing();
exit;

sub run_echo {
my $value = shift;

Expand Down

0 comments on commit 450021f

Please sign in to comment.