From 53e631970feabf31163a4abed4d25d1a743f20be Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 13 Nov 2017 16:45:59 +0000 Subject: Perl 5.10.1 compatibility. --- t/samplerun.t | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/t/samplerun.t b/t/samplerun.t index c3930ed..4df0d7d 100644 --- a/t/samplerun.t +++ b/t/samplerun.t @@ -2,6 +2,8 @@ use Test::More tests => 3; +use IO::File; + use strict; use warnings; @@ -9,7 +11,7 @@ my $config = 't/fixtures/localhost.conf'; my $testplan = 't/fixtures/testplan'; my $input = 't/fixtures/input'; -subtest 'standard input', sub { +do { my $cmd = "./xmpt -c $config -p $testplan"; my $xmptfh = new IO::File("|$cmd") or BAIL_OUT "Can't run '$cmd': $!.\n"; my $inputfh = new IO::File($input) or @@ -22,7 +24,7 @@ subtest 'standard input', sub { ok($? == 0, 'Standard input redirect'); }; -subtest 'timeout', sub { +do { my $cmd = "./xmpt -t 1 -c $config -p $testplan cat 2>/dev/null"; local $SIG{ALRM} = sub { fail("Timed out running $cmd.") }; alarm 5; @@ -30,7 +32,7 @@ subtest 'timeout', sub { ok(($? >> 8) != 0, 'Timeout test'); }; -subtest 'I/O redirected to cat', sub { +do { my $cmd = "./xmpt -c $config -p $testplan cat $input 2>/dev/null"; local $SIG{ALRM} = sub { fail("Timed out running $cmd.") }; alarm 10; -- cgit v1.2.3