From: Karen Etheridge Date: Sat, 22 Dec 2012 01:49:12 +0000 (-0800) Subject: test for warnings everywhere X-Git-Tag: v0.48~12 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9fbb5be9dcf64475fb6f4d25807db1e952be2365;p=gitmo%2FMooseX-Getopt.git test for warnings everywhere --- diff --git a/dist.ini b/dist.ini index d130d0a..8989ddc 100644 --- a/dist.ini +++ b/dist.ini @@ -33,6 +33,7 @@ Test::More = 0.88 Test::Requires = 0.05 Test::Trap = 0 Path::Class = 0 +Test::NoWarnings = 1.04 [InstallGuide] [MetaConfig] diff --git a/t/000_load.t b/t/000_load.t index 24b4081..3aec9d2 100644 --- a/t/000_load.t +++ b/t/000_load.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More tests => 2; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); diff --git a/t/001_basic.t b/t/001_basic.t index de997ad..fd340f6 100644 --- a/t/001_basic.t +++ b/t/001_basic.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 69; +use Test::More tests => 70; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); diff --git a/t/002_custom_option_type.t b/t/002_custom_option_type.t index 553a9fa..9b0dfad 100644 --- a/t/002_custom_option_type.t +++ b/t/002_custom_option_type.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 7; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); diff --git a/t/003_inferred_option_type.t b/t/003_inferred_option_type.t index 820d2fc..965014b 100644 --- a/t/003_inferred_option_type.t +++ b/t/003_inferred_option_type.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); diff --git a/t/004_nogetop.t b/t/004_nogetop.t index a4c4455..b90b914 100644 --- a/t/004_nogetop.t +++ b/t/004_nogetop.t @@ -1,8 +1,9 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; use Test::Fatal 0.003; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); diff --git a/t/005_strict.t b/t/005_strict.t index a1b9ee0..03eaf50 100644 --- a/t/005_strict.t +++ b/t/005_strict.t @@ -1,8 +1,9 @@ use strict; use warnings; -use Test::More tests => 10; +use Test::More tests => 11; use Test::Fatal; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); diff --git a/t/006_metaclass_traits.t b/t/006_metaclass_traits.t index 5ac0391..0169dd1 100644 --- a/t/006_metaclass_traits.t +++ b/t/006_metaclass_traits.t @@ -1,8 +1,9 @@ use strict; use warnings; -use Test::More tests => 69; +use Test::More tests => 70; use Test::Moose; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); diff --git a/t/007_nogetopt_trait.t b/t/007_nogetopt_trait.t index 341173c..7c29264 100644 --- a/t/007_nogetopt_trait.t +++ b/t/007_nogetopt_trait.t @@ -1,8 +1,9 @@ use strict; use warnings; -use Test::More tests => 9; +use Test::More tests => 10; use Test::Fatal; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt'); diff --git a/t/008_configfromfile.t b/t/008_configfromfile.t index bcb0322..44b20fe 100644 --- a/t/008_configfromfile.t +++ b/t/008_configfromfile.t @@ -1,9 +1,10 @@ use strict; use warnings; -use Test::More tests => 37; +use Test::More tests => 38; use Test::Fatal; use File::Spec; +use Test::NoWarnings 1.04 ':early'; use Test::Requires { 'MooseX::ConfigFromFile' => 0.01, # skip all if not installed diff --git a/t/009_gld_and_explicit_options.t b/t/009_gld_and_explicit_options.t index 9fc24f9..bf1a376 100644 --- a/t/009_gld_and_explicit_options.t +++ b/t/009_gld_and_explicit_options.t @@ -1,8 +1,9 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; use Test::Fatal; +use Test::NoWarnings 1.04 ':early'; use Test::Requires { 'Getopt::Long::Descriptive' => 0.01, # skip all if not installed diff --git a/t/010_dashes.t b/t/010_dashes.t index 87f49dd..004ca71 100644 --- a/t/010_dashes.t +++ b/t/010_dashes.t @@ -1,8 +1,9 @@ use strict; use warnings; -use Test::More tests => 7; +use Test::More tests => 8; use Test::Fatal; +use Test::NoWarnings 1.04 ':early'; BEGIN { diff --git a/t/100_gld_default_bug.t b/t/100_gld_default_bug.t index 3e3aa97..40ca140 100644 --- a/t/100_gld_default_bug.t +++ b/t/100_gld_default_bug.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; +use Test::NoWarnings 1.04 ':early'; use Test::Requires { 'Getopt::Long::Descriptive' => 0.01, # skip all if not installed diff --git a/t/101_argv_bug.t b/t/101_argv_bug.t index 3a38b15..318291c 100644 --- a/t/101_argv_bug.t +++ b/t/101_argv_bug.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 4; +use Test::NoWarnings 1.04 ':early'; use MooseX::Getopt; diff --git a/t/102_basic_basic.t b/t/102_basic_basic.t index 631550a..cf7cc19 100644 --- a/t/102_basic_basic.t +++ b/t/102_basic_basic.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 69; +use Test::More tests => 70; +use Test::NoWarnings 1.04 ':early'; BEGIN { use_ok('MooseX::Getopt::Basic'); diff --git a/t/103_uc_bug.t b/t/103_uc_bug.t index c9fa04e..b9e694e 100644 --- a/t/103_uc_bug.t +++ b/t/103_uc_bug.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 4; +use Test::NoWarnings 1.04 ':early'; { package App; diff --git a/t/104_override_usage.t b/t/104_override_usage.t index 71ff691..3f0da19 100644 --- a/t/104_override_usage.t +++ b/t/104_override_usage.t @@ -1,8 +1,9 @@ use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; use Test::Trap; +use Test::NoWarnings 1.04 ':early'; { package MyScript; diff --git a/t/105_uc_bug_more.t b/t/105_uc_bug_more.t index 04a8c9b..5c11042 100644 --- a/t/105_uc_bug_more.t +++ b/t/105_uc_bug_more.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 12; +use Test::More tests => 13; +use Test::NoWarnings 1.04 ':early'; use Moose (); use Moose::Meta::Class; diff --git a/t/106_no_ignore_case.t b/t/106_no_ignore_case.t index 06955c8..e9e1659 100644 --- a/t/106_no_ignore_case.t +++ b/t/106_no_ignore_case.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 21; +use Test::More tests => 22; +use Test::NoWarnings 1.04 ':early'; use Moose (); use Moose::Meta::Class; diff --git a/t/107_no_auto_help.t b/t/107_no_auto_help.t index d3eb573..e3b2132 100644 --- a/t/107_no_auto_help.t +++ b/t/107_no_auto_help.t @@ -11,10 +11,12 @@ use strict; use warnings; -use Test::More tests => 1; +use Test::More tests => 2; + use Test::Requires { 'MooseX::SimpleConfig' => 0.07, # skip all if not installed }; +use Test::NoWarnings 1.04 ':early'; my $fail_on_exit = 1; { diff --git a/t/107_union_bug.t b/t/107_union_bug.t index 270e3bf..a1d4b7c 100644 --- a/t/107_union_bug.t +++ b/t/107_union_bug.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; +use Test::NoWarnings 1.04 ':early'; { package example; diff --git a/t/108_usage_attr.t b/t/108_usage_attr.t index cb2ff86..3fd6c4d 100644 --- a/t/108_usage_attr.t +++ b/t/108_usage_attr.t @@ -4,7 +4,8 @@ # This tests the fix (that fulfills the documentation claim). use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 4; +use Test::NoWarnings 1.04 ':early'; { package MyClass; diff --git a/t/109_help_flag.t b/t/109_help_flag.t index fd54ea9..33390de 100644 --- a/t/109_help_flag.t +++ b/t/109_help_flag.t @@ -17,7 +17,8 @@ # Update: since 0.41, usage info is printed to stdout, not stderr. use strict; use warnings; -use Test::More tests => 22; +use Test::More tests => 23; +use Test::NoWarnings 1.04 ':early'; use Test::Trap; { diff --git a/t/110_sort_usage_by_attr_order.t b/t/110_sort_usage_by_attr_order.t index c7677e0..c424add 100644 --- a/t/110_sort_usage_by_attr_order.t +++ b/t/110_sort_usage_by_attr_order.t @@ -9,7 +9,8 @@ # options added by this class. use strict; use warnings; -use Test::More tests => 1; +use Test::More tests => 2; +use Test::NoWarnings 1.04 ':early'; { package MyClass; diff --git a/t/111_gld_pass_through.t b/t/111_gld_pass_through.t index 48e7f7a..faecb98 100644 --- a/t/111_gld_pass_through.t +++ b/t/111_gld_pass_through.t @@ -1,7 +1,8 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; +use Test::NoWarnings 1.04 ':early'; use Test::Requires { 'Getopt::Long::Descriptive' => 0.01, # skip all if not installed diff --git a/t/112_configfile_constructor_arg.t b/t/112_configfile_constructor_arg.t index 1798a65..9465ede 100644 --- a/t/112_configfile_constructor_arg.t +++ b/t/112_configfile_constructor_arg.t @@ -6,7 +6,8 @@ use Test::Requires # respect the configfile value passed into the constructor. -use Test::More tests => 2; +use Test::More tests => 3; +use Test::NoWarnings 1.04 ':early'; use Path::Class; # exports file, dir {