aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2017-11-13 16:45:59 +0000
committerBrian Cully <bjc@kublai.com>2017-11-13 16:45:59 +0000
commit53e631970feabf31163a4abed4d25d1a743f20be (patch)
tree5f534e42d79f9d5ff0efdaef7116998ff08da7ec /t
parente40b8088c3561493f9d66cad8f588085c46c0f96 (diff)
downloadxmpt-53e631970feabf31163a4abed4d25d1a743f20be.tar.gz
xmpt-53e631970feabf31163a4abed4d25d1a743f20be.zip
Perl 5.10.1 compatibility.
Diffstat (limited to 't')
-rw-r--r--t/samplerun.t8
1 files 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;