From: Tomas Doran Date: Fri, 13 Apr 2012 08:27:24 +0000 (+0100) Subject: Fix tests for new GLD. RT#76287 X-Git-Tag: 0.40~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=99d37f16055fee81d8db6679068a9a0893eab4e2;p=gitmo%2FMooseX-Getopt.git Fix tests for new GLD. RT#76287 --- diff --git a/ChangeLog b/ChangeLog index 233f75c..3f34e4c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ Revision history for Perl extension MooseX-Getopt + * Fix tests when MooseX::ConfigFromFile is installed, with + Getopt::Long::Descriptive >= 0.091. RT#76287 * Pod fix from debian. Salvatore Bonaccorso RT#74681 * Spelling fix from debian. Jonathan Yu RT#74681 diff --git a/t/008_configfromfile.t b/t/008_configfromfile.t index 9d55f52..ee359a9 100644 --- a/t/008_configfromfile.t +++ b/t/008_configfromfile.t @@ -86,7 +86,12 @@ use Test::Requires { { local @ARGV = qw( --required_from_argv 1 ); - like exception { App->new_with_options }, qr/Required option missing: required_from_config/; + if ($Getopt::Long::Descriptive::VERSION >= 0.091) { + like exception { App->new_with_options }, qr/Mandatory parameter 'required_from_config' missing/; + } + else { + like exception { App->new_with_options }, qr/Required option missing: required_from_config/; + } { my $app = App::DefaultConfigFile->new_with_options; @@ -155,7 +160,12 @@ use Test::Requires { # Required arg not supplied from cmdline { local @ARGV = qw( --configfile /notused ); - like exception { App->new_with_options }, qr/Required option missing: required_from_argv/; + if ($Getopt::Long::Descriptive::VERSION >= 0.091) { + like exception { App->new_with_options }, qr/Mandatory parameter 'required_from_argv' missing/; + } + else { + like exception { App->new_with_options }, qr/Required option missing: required_from_argv/; + } } # Config file value overriden from cmdline