From: Karen Etheridge Date: Sun, 27 Jun 2010 23:34:34 +0000 (-0700) Subject: removed timestamp from Changelog; added additional test to swallow stderr output... X-Git-Tag: 0.30~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=84a583159f38ec9a0149efdbc392edb774680fab;p=gitmo%2FMooseX-Getopt.git removed timestamp from Changelog; added additional test to swallow stderr output (and updated dependency list) --- diff --git a/ChangeLog b/ChangeLog index 6ab1c89..15ac206 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,7 @@ Revision history for Perl extension MooseX-Getopt - Disable auto_help config in Getopt::Long, to avoid calling into pod2usage when the --help option is used while MooseX::ConfigFromFile is in use (the intent is just to fetch the value of the configfile - option). (RT#57683) + option). (RT#57683) (Karen Etheridge) 0.29 Tue. Jun 15 2010 * Fix repository metadata. Thanks Robert Bohne for noticing! diff --git a/dist.ini b/dist.ini index 5c5b778..045dfb7 100644 --- a/dist.ini +++ b/dist.ini @@ -26,4 +26,5 @@ Moose = 0.56 [Prereq / TestRequires] Test::Exception = 0.21 +Test::Warn = 0.21 Test::More = 0.88 diff --git a/t/107_no_auto_help.t b/t/107_no_auto_help.t index 5450092..a45ef52 100644 --- a/t/107_no_auto_help.t +++ b/t/107_no_auto_help.t @@ -39,7 +39,9 @@ my $fail_on_exit = 1; 1; } -use Test::More tests => 1; +use Test::More tests => 3; +use Test::Warn; +use Test::Exception; END { ok(!$fail_on_exit, 'getoptions() lives'); @@ -50,5 +52,12 @@ END { @ARGV = ('--help'); -Class->new_with_options; + +warning_like { + throws_ok { Class->new_with_options } + qr/^usage: [\d\w]+\Q.t [long options...]\E.\t--configfile\s*.\t--help/ms, + 'usage information looks good'; + } + qr/^Specified configfile \'this_value_unimportant\' does not exist, is empty, or is not readable$/, + 'Our dummy config file doesn\'t exist';