summaryrefslogtreecommitdiffstats
path: root/t/detect.t
diff options
context:
space:
mode:
Diffstat (limited to 't/detect.t')
-rw-r--r--t/detect.t17
1 files changed, 2 insertions, 15 deletions
diff --git a/t/detect.t b/t/detect.t
index ad03dcc..feaea1c 100644
--- a/t/detect.t
+++ b/t/detect.t
@@ -2,21 +2,8 @@
use strict;
use warnings;
use Test::More;
-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);
-}
+use lib 't/lib';
+use TestHelpers 'output_like';
output_like(<<EOF,
use Carp::Always::Color;