From 1a78464c29f3a79dad22222ac7b8522a82d099c4 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 2 Jan 2013 10:17:51 -0600 Subject: make this test work with prove it previously only worked under 'make test', which sets up @INC properly --- t/detect.t | 3 +++ 1 file changed, 3 insertions(+) diff --git a/t/detect.t b/t/detect.t index 772365c..158ce31 100644 --- a/t/detect.t +++ b/t/detect.t @@ -6,11 +6,14 @@ BEGIN { eval "use IO::Pty::Easy;"; plan skip_all => "IO::Pty::Easy is required for this test" if $@; } +use B; sub output_like { local $Test::Builder::Level = $Test::Builder::Level + 1; my ($script, $expected, $desc) = @_; my $pty = IO::Pty::Easy->new; + my $inc = '(' . join(',', map { B::perlstring($_) } @INC) . ')'; + $script = "BEGIN { \@INC = $inc }$script"; $pty->spawn("$^X", "-e", $script); like($pty->read, $expected, $desc); } -- cgit v1.2.3