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~6^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-Getopt.git;a=commitdiff_plain;h=739ba280e7e594c7e27162f5b40599f7b90463f2;hp=13f71373313b4df297eb33ea45a9e671820a487e removed timestamp from Changelog; added additional test to swallow stderr output (and updated dependency list) --- diff --git a/ChangeLog b/ChangeLog index d0d7a99..15ac206 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,10 @@ Revision history for Perl extension MooseX-Getopt -N+1 0.29_01 Fri. Jun 25 2010 * MooseX::Getopt::Basic - 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';