~ubuntu-branches/ubuntu/wily/librole-tiny-perl/wily-proposed

« back to all changes in this revision

Viewing changes to xt/Moo.t

  • Committer: Package Import Robot
  • Author(s): Axel Beckert
  • Date: 2015-07-13 21:17:52 UTC
  • mfrom: (13.1.1 experimental)
  • Revision ID: package-import@ubuntu.com-20150713211752-jl2fg5u1vd1brewd
Tags: 2.000001-2
Upload to unstable again. (Team upload)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use strict;
 
2
use warnings;
 
3
use Test::More $ENV{EXTENDED_TESTING} ? ()
 
4
  : (skip_all => 'Set EXTENDED_TESTING to enable Moo testing');
 
5
 
 
6
use IPC::Open3;
 
7
use File::Spec;
 
8
use Config;
 
9
 
 
10
$ENV{PERL5LIB} = join $Config{path_sep}, @INC;
 
11
 
 
12
open my $in, '<', File::Spec->devnull
 
13
  or die "can't open devnull: $!";
 
14
 
 
15
my $pid = open3 $in, my $out, undef, $^X, '-MCPAN', '-e', 'test @ARGV', 'Moo';
 
16
my $output = do { local $/; <$out> };
 
17
close $out;
 
18
waitpid $pid, 0;
 
19
 
 
20
my $status = $?;
 
21
like $output, qr/--\s*OK\s*\z/,
 
22
  'Moo passed tests';
 
23
 
 
24
done_testing;