From a90dd2653eae4ad68b9c70a95e2c1277c2da70e8 Mon Sep 17 00:00:00 2001 From: Chris Fields Date: Tue, 21 May 2013 15:53:25 -0500 Subject: [PATCH] update tests for perl 5.18 --- t/Tools/Run/WBCommandExts.t | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/t/Tools/Run/WBCommandExts.t b/t/Tools/Run/WBCommandExts.t index 84f5c01..6f1930c 100755 --- a/t/Tools/Run/WBCommandExts.t +++ b/t/Tools/Run/WBCommandExts.t @@ -11,7 +11,7 @@ BEGIN { $home = '../../..'; # set to '.' for Build use, # '../../..' for debugging from .t file unshift @INC, $home; - test_begin(-tests => 22, + test_begin(-tests => 25, -requires_modules => [qw(Bio::Tools::Run::WrapperBase Bio::Tools::Run::WrapperBase::CommandExts)]); } @@ -30,7 +30,16 @@ is $fac->program_name, 'flurb', "correct prog name"; ok $fac->is_pseudo, "is pseudo"; is $fac->narf, 42, "correct parm set"; ok !$fac->parameters_changed, "parm flag cleared"; -is join(' ',@{$fac->_translate_params}), '--schlurb breb -n 42 -f', "translate opts to command line"; +my $param_str = join(' ',@{$fac->_translate_params}); + +like ($param_str, qr/--schlurb breb/, 'translate opts to command line'); +like ($param_str, qr/-n 42/, 'translate opts to command line'); +like ($param_str, qr/-f/, 'translate opts to command line'); + +TODO: { + local $TODO ='Determine whether the order of the parameters should be set somehow; this sporadically breaks hash randomization introduced in perl 5.17+'; + is join(' ',@{$fac->_translate_params}), '--schlurb breb -n 42 -f', "translate opts to command line"; +} ok $fac->reset_parameters, "parm reset"; ok !$fac->narf, "parm cleared after reset"; -- 2.11.4.GIT